Bug 919845 - Really make Fira Sans the default font. r=jfkthame, a=hd+
authorMichael Wu <mwu@mozilla.com>
Tue, 24 Sep 2013 10:57:25 -0700
changeset 160868 0ac1262bd75fce2a53c8076d7e4dffa7ab0e2090
parent 160867 50fe21f422201e70bca400e062409660c336d502
child 160869 4947996681ed28742b5e097da7a6e59ab1b146e4
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjfkthame, hd
bugs919845
milestone26.0a2
Bug 919845 - Really make Fira Sans the default font. r=jfkthame, a=hd+
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,463) == 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
@@ -383,17 +383,17 @@ nsLookAndFeel::GetIntImpl(IntID aID, int
 }
 
 /*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;
 }