diff --git a/gfx/thebes/gfxFontEntry.cpp b/gfx/thebes/gfxFontEntry.cpp index 56861e64c08f..3da3c25b8d2d 100644 --- a/gfx/thebes/gfxFontEntry.cpp +++ b/gfx/thebes/gfxFontEntry.cpp @@ -1662,9 +1662,9 @@ CalcStyleMatch(gfxFontEntry *aFontEntry, const gfxFontStyle *aStyle) // measure of closeness of weight to the desired value if (aFontEntry->Weight().Min() > aStyle->weight) { - rank += aFontEntry->Weight().Min() - aStyle->weight; + rank += 1000.0f - (aFontEntry->Weight().Min() - aStyle->weight); } else if (aFontEntry->Weight().Max() < aStyle->weight) { - rank += aStyle->weight - aFontEntry->Weight().Max(); + rank += 1000.0f - (aStyle->weight - aFontEntry->Weight().Max()); } else { rank += 2000.0f; // the font supports the exact weight wanted } diff --git a/layout/reftests/font-matching/reftest.list b/layout/reftests/font-matching/reftest.list index dd1bb858f1cc..d83db474c8ad 100644 --- a/layout/reftests/font-matching/reftest.list +++ b/layout/reftests/font-matching/reftest.list @@ -19,7 +19,7 @@ pref(font.default.zh-CN,"sans-serif") pref(font.default.zh-TW,"sans-serif") pref # 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 +skip-if(!winWidget) == 1458158-1.html 1458158-1-ref.html # basic tests for bug 538730 != synthetic-bold-1.html synthetic-bold-1-ref.html