Bug 919845 - Really make Fira Sans the default font, r=jfkthame
authorMichael Wu <mwu@mozilla.com>
Tue, 24 Sep 2013 10:57:25 -0700
changeset 162326 55e06972ede0b0a13630b637c22b4b29d859d9d9
parent 162325 b178957474a36c578e724a574a7d4e0ab2b79a27
child 162327 70d3e08d7788182206fb653449a006bb5f0ed72d
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjfkthame
bugs919845
milestone27.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 919845 - Really make Fira Sans the default font, r=jfkthame
gfx/thebes/gfxFT2FontList.cpp
layout/reftests/canvas/reftest.list
widget/gonk/nsLookAndFeel.cpp
--- a/gfx/thebes/gfxFT2FontList.cpp
+++ b/gfx/thebes/gfxFT2FontList.cpp
@@ -1421,17 +1421,22 @@ gfxFT2FontList::GetDefaultFont(const gfx
     HGDIOBJ hGDI = ::GetStockObject(SYSTEM_FONT);
     LOGFONTW logFont;
     if (hGDI && ::GetObjectW(hGDI, sizeof(logFont), &logFont)) {
         nsAutoString resolvedName;
         if (ResolveFontName(nsDependentString(logFont.lfFaceName), resolvedName)) {
             return FindFamily(resolvedName);
         }
     }
-#elif defined(ANDROID)
+#elif defined(MOZ_WIDGET_GONK)
+    nsAutoString resolvedName;
+    if (ResolveFontName(NS_LITERAL_STRING("Fira Sans OT"), resolvedName)) {
+        return FindFamily(resolvedName);
+    }
+#elif defined(MOZ_WIDGET_ANDROID)
     nsAutoString resolvedName;
     if (ResolveFontName(NS_LITERAL_STRING("Roboto"), resolvedName) ||
         ResolveFontName(NS_LITERAL_STRING("Droid Sans"), resolvedName)) {
         return FindFamily(resolvedName);
     }
 #endif
     /* TODO: what about Qt or other platforms that may use this? */
     return nullptr;
--- a/layout/reftests/canvas/reftest.list
+++ b/layout/reftests/canvas/reftest.list
@@ -38,17 +38,17 @@ fuzzy-if(B2G&&azureSkiaGL,1,256) == text
 == text-no-frame-test.html text-no-frame-ref.html
 == text-no-frame-2-test.html text-not-in-doc-ref.html
 fuzzy-if(azureSkiaGL,10,400) == text-not-in-doc-test.html text-not-in-doc-ref.html
 
 == text-bidi-ltr-test.html text-bidi-ltr-ref.html
 != text-bidi-ltr-test.html text-bidi-ltr-notref.html # for bug 698185
 == text-bidi-rtl-test.html text-bidi-rtl-ref.html
 
-!= text-font-lang.html text-font-lang-notref.html
+skip-if(B2G) != text-font-lang.html text-font-lang-notref.html
 
 == text-measure.html text-measure-ref.html
 
 random-if(!d2d) != text-subpixel-1.html text-subpixel-1-ref.html
 
 == strokeText-path.html strokeText-path-ref.html
 
 # check that emoji character renders as something non-blank (for Apple Color Emoji font, bug 715798)
--- a/widget/gonk/nsLookAndFeel.cpp
+++ b/widget/gonk/nsLookAndFeel.cpp
@@ -415,17 +415,17 @@ nsLookAndFeel::GetFloatImpl(FloatID aID,
 }
 
 /*virtual*/
 bool
 nsLookAndFeel::GetFontImpl(FontID aID, nsString& aFontName,
                            gfxFontStyle& aFontStyle,
                            float aDevPixPerCSSPixel)
 {
-    aFontName.AssignLiteral("\"Fira Sans\"");
+    aFontName.AssignLiteral("\"Fira Sans OT\"");
     aFontStyle.style = NS_FONT_STYLE_NORMAL;
     aFontStyle.weight = NS_FONT_WEIGHT_NORMAL;
     aFontStyle.stretch = NS_FONT_STRETCH_NORMAL;
     aFontStyle.size = 9.0 * 96.0f / 72.0f;
     aFontStyle.systemFont = true;
     return true;
 }