Bug 1458158 - Testcase for rendering Arabic characters when styled with an extra-bold weight of Arial. r=jwatt
authorJonathan Kew <jkew@mozilla.com>
Tue, 01 May 2018 15:55:06 +0100
changeset 472736 74b436c29aa163c01461818f746425201b4c0701
parent 472735 e9bcae3bf5ca11a2fbeee6f0f2fd52b71395c7dd
child 472737 7faed86e281517ca8edee7adcac488a81d90433e
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwatt
bugs1458158
milestone61.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 1458158 - Testcase for rendering Arabic characters when styled with an extra-bold weight of Arial. r=jwatt
layout/reftests/font-matching/1458158-1-ref.html
layout/reftests/font-matching/1458158-1.html
layout/reftests/font-matching/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-matching/1458158-1-ref.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<style>
+    @font-face {
+        font-family: arial_bold;
+        font-weight: bold;
+        src: local("Arial Bold");
+    }
+    @font-face {
+        font-family: arial_black;
+        font-weight: 900;
+        src: local("Arial Black");
+    }
+    h1 {
+        font-family: arial_bold;
+    }
+    b {
+        font-family: arial_black, arial_bold;
+    }
+    x {
+        font-family: Arial;
+        font-size: 2em;
+        color: transparent;
+    }
+</style>
+<h1>bold العربي <b>bolder العربي</b><x>A</x></h1>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-matching/1458158-1.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<style>
+    @font-face {
+        font-family: arial_black;
+        font-weight: 900;
+        src: local("Arial Black");
+    }
+    h1 {
+        font-family: Arial;
+        font-weight: bold;
+    }
+    /* We include an extra-large invisible character in the test line
+       to ensure a consistent baseline; otherwise differing metrics
+       between the various Arial faces can disrupt it. */
+    x {
+        font-family: Arial;
+        font-size: 2em;
+        color: transparent;
+    }
+</style>
+<h1>bold العربي <b>bolder العربي</b><x>A</x></h1>
--- a/layout/reftests/font-matching/reftest.list
+++ b/layout/reftests/font-matching/reftest.list
@@ -12,16 +12,20 @@ default-preferences pref(gfx.font_loader
 pref(font.default.zh-CN,"serif") pref(font.default.zh-TW,"serif") pref(font.default.ja,"serif") pref(font.default.ko,"serif") random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == 1394311.htm 1394311-ref.htm
 pref(font.default.zh-CN,"sans-serif") pref(font.default.zh-TW,"sans-serif") pref(font.default.ja,"sans-serif") pref(font.default.ko,"sans-serif") skip-if(winWidget&&/^Windows\x20NT\x206\.1/.test(http.oscpu)) == 1394311.htm 1394311-ref.htm
 
 # tests for bug 1367860 (correct default generic font based on language)
 == 1367860-1.htm 1367860-ref.htm
 == 1367860-2.htm 1367860-ref.htm
 == 1367860-3.htm 1367860-ref.htm
 
+# Test for bug 1458158: Arabic text in Arial weight 900 should fall back to Bold rather than Regular.
+# Limited to Windows because this is specific to the fonts shipped on Windows by default.
+skip-if(!winWidget) fails-if(winWidget) == 1458158-1.html 1458158-1-ref.html
+
 # basic tests for bug 538730
 != synthetic-bold-1.html synthetic-bold-1-ref.html
 != synthetic-bold-2.html synthetic-bold-2-ref.html
 
 # synthetic bold/italic tests
 != defaultfont-bold.html defaultfont.html
 != defaultfont-italic.html defaultfont.html 
 != defaultfont-oblique.html defaultfont.html