Test that small caps of web fonts works regardless of where the font face is declared
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Nov 2014 18:21:53 +0000 (18:21 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Nov 2014 18:21:53 +0000 (18:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=138700

Reviewed by Alexey Proskuryakov.

* fast/text/svg-small-caps-expected.html: Added.
* fast/text/svg-small-caps.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@176126 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/text/svg-small-caps-expected.html [new file with mode: 0644]
LayoutTests/fast/text/svg-small-caps.html [new file with mode: 0644]

index 86779f89815ea52b7445926cca646ad99bf74dcb..9e438457e08ca37b545f1b707141d9bb8822eb1d 100644 (file)
@@ -1,3 +1,13 @@
+2014-11-14  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        Test that small caps of web fonts works regardless of where the font face is declared
+        https://bugs.webkit.org/show_bug.cgi?id=138700
+
+        Reviewed by Alexey Proskuryakov.
+
+        * fast/text/svg-small-caps-expected.html: Added.
+        * fast/text/svg-small-caps.html: Added.
+
 2014-11-14  Alexey Proskuryakov  <ap@apple.com>
 
         Many (most?)  transitions tests are very flaky, frequently failing all at once
diff --git a/LayoutTests/fast/text/svg-small-caps-expected.html b/LayoutTests/fast/text/svg-small-caps-expected.html
new file mode 100644 (file)
index 0000000..7e9f96f
--- /dev/null
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+    This test makes sure that small-caps of web fonts work regardless of whether
+    the web font is supplied in SVG or in CSS.
+    <svg width="500px" height="40px">
+        <defs>
+            <font-face font-family="DroidSans">
+                <font-face-src>
+                    <font-face-uri xlink:href="../writing-mode/resources/DroidSansFallback-reduced.ttf" format="truetype"/>
+                </font-face-src>
+            </font-face>
+        </defs>
+        <text font-family="DroidSans" x="0" y="16" font-variant="normal">This is some text</text>
+        <text font-family="DroidSans" x="0" y="32" font-variant="small-caps">This is some text</text>
+    </svg>
+    <div style="font-family: DroidSans; font-variant: small-caps;">This is some text</div>
+    <div style="font-family: DroidSans;">This is some text</div>
+</body>
+</html>
+
diff --git a/LayoutTests/fast/text/svg-small-caps.html b/LayoutTests/fast/text/svg-small-caps.html
new file mode 100644 (file)
index 0000000..b318fb4
--- /dev/null
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+    font-family: "DroidSans";
+    src: url("../writing-mode/resources/DroidSansFallback-reduced.ttf") format("truetype");
+}
+</style>
+</head>
+<body>
+    This test makes sure that small-caps of web fonts work regardless of whether
+    the web font is supplied in SVG or in CSS.
+    <svg width="500px" height="40px">
+        <text font-family="DroidSans" x="0" y="16" font-variant="normal">This is some text</text>
+        <text font-family="DroidSans" x="0" y="32" font-variant="small-caps">This is some text</text>
+    </svg>
+    <div style="font-family: DroidSans; font-variant: small-caps;">This is some text</div>
+    <div style="font-family: DroidSans;">This is some text</div>
+</body>
+</html>
+