bug 700022 - pt 2 - reftests for lang-tag handling in graphite shaper. r=jdaggett
☠☠ backed out by 5f688e2b37dc ☠ ☠
authorJonathan Kew <jkew@mozilla.com>
Fri, 22 Feb 2013 13:36:02 +0000
changeset 122644 ac6dff6a0811708d1f58af1078c7bae17da5878d
parent 122643 f97bc1de213a1c9a5061c1b96f762773dda18105
child 122645 788c24847525659175fc32933021fd164401b86b
push id24356
push usergszorc@mozilla.com
push dateSun, 24 Feb 2013 01:00:12 +0000
treeherdermozilla-central@195e706140d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdaggett
bugs700022
milestone22.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 700022 - pt 2 - reftests for lang-tag handling in graphite shaper. r=jdaggett
layout/reftests/text/graphite-04-fa.html
layout/reftests/text/graphite-04-ref.html
layout/reftests/text/graphite-04-sd.html
layout/reftests/text/graphite-04-snd.html
layout/reftests/text/graphite-04-ur.html
layout/reftests/text/graphite-04-urd.html
layout/reftests/text/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/text/graphite-04-fa.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<head>
+<meta charset="utf-8">
+<style type="text/css">
+@font-face {
+  font-family: schz-gr;
+  src: url("../fonts/sil/Scheherazade-R 2012-07-03c.ttf");
+}
+body {
+  font-family: schz-gr;
+  font-size: 40px;
+}
+</style>
+</head>
+<body lang="fa">
+<!-- Persian (Farsi) should be the same as English-tagged -->
+&#x6f0;&#x6f1;&#x6f2;&#x6f3;&#x6f4;&#x6f5;&#x6f6;&#x6f7;&#x6f8;&#x6f9;
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/text/graphite-04-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<head>
+<meta charset="utf-8">
+<style type="text/css">
+@font-face {
+  font-family: schz-gr;
+  src: url("../fonts/sil/Scheherazade-R 2012-07-03c.ttf");
+}
+body {
+  font-family: schz-gr;
+  font-size: 40px;
+}
+</style>
+</head>
+<body lang="en">
+<!-- for testing Graphite language support we'll use the Eastern Arabic-Indic digits;
+     default rendering will have the Persian forms -->
+&#x6f0;&#x6f1;&#x6f2;&#x6f3;&#x6f4;&#x6f5;&#x6f6;&#x6f7;&#x6f8;&#x6f9;
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/text/graphite-04-sd.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<head>
+<meta charset="utf-8">
+<style type="text/css">
+@font-face {
+  font-family: schz-gr;
+  src: url("../fonts/sil/Scheherazade-R 2012-07-03c.ttf");
+}
+body {
+  font-family: schz-gr;
+  font-size: 40px;
+}
+</style>
+</head>
+<body lang="sd">
+<!-- Sindhi - digits 6 and 7 have different forms -->
+&#x6f0;&#x6f1;&#x6f2;&#x6f3;&#x6f4;&#x6f5;&#x6f6;&#x6f7;&#x6f8;&#x6f9;
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/text/graphite-04-snd.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<head>
+<meta charset="utf-8">
+<style type="text/css">
+@font-face {
+  font-family: schz-gr;
+  src: url("../fonts/sil/Scheherazade-R 2012-07-03c.ttf");
+}
+body {
+  font-family: schz-gr;
+  font-size: 40px;
+}
+</style>
+</head>
+<body lang="snd">
+<!-- Sindhi incorrectly tagged with iso-639-3 code instead of bcp47/iso-639-1;
+     rendering should therefore match the default "en", NOT the correctly-tagged "sd" version -->
+&#x6f0;&#x6f1;&#x6f2;&#x6f3;&#x6f4;&#x6f5;&#x6f6;&#x6f7;&#x6f8;&#x6f9;
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/text/graphite-04-ur.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<head>
+<meta charset="utf-8">
+<style type="text/css">
+@font-face {
+  font-family: schz-gr;
+  src: url("../fonts/sil/Scheherazade-R 2012-07-03c.ttf");
+}
+body {
+  font-family: schz-gr;
+  font-size: 40px;
+}
+</style>
+</head>
+<body lang="ur">
+<!-- in Urdu, the digit 4 should differ from Sindhi,
+     and 6 and 7 also differ from Persian -->
+&#x6f0;&#x6f1;&#x6f2;&#x6f3;&#x6f4;&#x6f5;&#x6f6;&#x6f7;&#x6f8;&#x6f9;
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/text/graphite-04-urd.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<head>
+<meta charset="utf-8">
+<style type="text/css">
+@font-face {
+  font-family: schz-gr;
+  src: url("../fonts/sil/Scheherazade-R 2012-07-03c.ttf");
+}
+body {
+  font-family: schz-gr;
+  font-size: 40px;
+}
+</style>
+</head>
+<body lang="urd">
+<!-- incorrectly-tagged Urdu should match the default rendering -->
+&#x6f0;&#x6f1;&#x6f2;&#x6f3;&#x6f4;&#x6f5;&#x6f6;&#x6f7;&#x6f8;&#x6f9;
+</body>
+</html>
--- a/layout/reftests/text/reftest.list
+++ b/layout/reftests/text/reftest.list
@@ -178,16 +178,24 @@ fuzzy-if(winWidget,43,220) pref(gfx.font
 pref(gfx.font_rendering.graphite.enabled,true) HTTP(..) != graphite-03a.html graphite-03-notref.html
 pref(gfx.font_rendering.graphite.enabled,true) HTTP(..) != graphite-03b.html graphite-03-notref.html
 pref(gfx.font_rendering.graphite.enabled,false) HTTP(..) != graphite-01.html graphite-01-ref.html
 pref(gfx.font_rendering.graphite.enabled,false) HTTP(..) != graphite-02.html graphite-02-ref.html
 # test 03a (lang setting in Padauk font) now works in opentype/harfbuzz as well, but not on Windows (using Uniscribe/DirectWrite)
 fails-if(winWidget) pref(gfx.font_rendering.graphite.enabled,false) HTTP(..) != graphite-03a.html graphite-03-notref.html
 pref(gfx.font_rendering.graphite.enabled,false) HTTP(..) == graphite-03b.html graphite-03-notref.html
 
+# tests for graphite rendering with valid and invalid lang tags
+pref(gfx.font_rendering.graphite.enabled,true) HTTP(..) == graphite-04-fa.html graphite-04-ref.html
+pref(gfx.font_rendering.graphite.enabled,true) HTTP(..) != graphite-04-sd.html graphite-04-ref.html
+pref(gfx.font_rendering.graphite.enabled,true) HTTP(..) == graphite-04-snd.html graphite-04-ref.html
+pref(gfx.font_rendering.graphite.enabled,true) HTTP(..) != graphite-04-ur.html graphite-04-ref.html
+pref(gfx.font_rendering.graphite.enabled,true) HTTP(..) == graphite-04-urd.html graphite-04-ref.html
+pref(gfx.font_rendering.graphite.enabled,true) HTTP(..) != graphite-04-sd.html graphite-04-ur.html
+
 # tests to compare graphite to opentype (will trivially pass when graphite not enabled)
 HTTP(..) == graphite-05-ot-only.html graphite-05-ref.html
 HTTP(..) != graphite-05-ot-only.html graphite-05-fail.html
 HTTP(..) == graphite-05-simple.html graphite-05-ref.html
 HTTP(..) == graphite-05-multipass.html graphite-05-ref.html
 HTTP(..) == graphite-05-lang.html graphite-05-ref.html
 HTTP(..) == graphite-05-badlang.html graphite-05-ref.html
 HTTP(..) == graphite-05-feat.html graphite-05-ref.html