diff --git a/gfx/thebes/gfxFontconfigUtils.cpp b/gfx/thebes/gfxFontconfigUtils.cpp index 4dcb769720e7..f5d3e9c91d13 100644 --- a/gfx/thebes/gfxFontconfigUtils.cpp +++ b/gfx/thebes/gfxFontconfigUtils.cpp @@ -598,7 +598,6 @@ gfxFontconfigUtils::UpdateFontListInternal(bool aForce) mFontsByFamily.Clear(); mFontsByFullname.Clear(); mLangSupportTable.Clear(); - mAliasForMultiFonts.Clear(); // Record the existing font families for (unsigned fs = 0; fs < ArrayLength(fontSets); ++fs) { @@ -632,36 +631,6 @@ gfxFontconfigUtils::UpdateFontListInternal(bool aForce) } } - // XXX we don't support all alias names. - // Because if we don't check whether the given font name is alias name, - // fontconfig converts the non existing font to sans-serif. - // This is not good if the web page specifies font-family - // that has Windows font name in the first. - NS_ENSURE_TRUE(Preferences::GetRootBranch(), NS_ERROR_FAILURE); - nsAdoptingCString list = Preferences::GetCString("font.alias-list"); - - if (!list.IsEmpty()) { - const char kComma = ','; - const char *p, *p_end; - list.BeginReading(p); - list.EndReading(p_end); - while (p < p_end) { - while (nsCRT::IsAsciiSpace(*p)) { - if (++p == p_end) - break; - } - if (p == p_end) - break; - const char *start = p; - while (++p != p_end && *p != kComma) - /* nothing */ ; - nsAutoCString name(Substring(start, p)); - name.CompressWhitespace(false, true); - mAliasForMultiFonts.AppendElement(name); - p++; - } - } - mLastConfig = currentConfig; return NS_OK; } diff --git a/gfx/thebes/gfxFontconfigUtils.h b/gfx/thebes/gfxFontconfigUtils.h index 588d919bcd45..de9f27f90658 100644 --- a/gfx/thebes/gfxFontconfigUtils.h +++ b/gfx/thebes/gfxFontconfigUtils.h @@ -302,8 +302,6 @@ protected: nsTHashtable mLangSupportTable; const nsTArray< nsCountedRef > mEmptyPatternArray; - nsTArray mAliasForMultiFonts; - FcConfig *mLastConfig; #ifdef MOZ_BUNDLED_FONTS diff --git a/gfx/thebes/gfxPangoFonts.cpp b/gfx/thebes/gfxPangoFonts.cpp index 05af9828feea..9e8bd8328e42 100644 --- a/gfx/thebes/gfxPangoFonts.cpp +++ b/gfx/thebes/gfxPangoFonts.cpp @@ -1227,12 +1227,6 @@ PrepareSortPattern(FcPattern *aPattern, double aFallbackSize, cairo_font_options_destroy(options); FcPatternAddBool(aPattern, PRINTING_FC_PROPERTY, FcTrue); } else { -#ifdef MOZ_GFX_OPTIMIZE_MOBILE - cairo_font_options_t *options = cairo_font_options_create(); - cairo_font_options_set_hint_style(options, CAIRO_HINT_STYLE_NONE); - cairo_ft_font_options_substitute(options, aPattern); - cairo_font_options_destroy(options); -#endif #ifdef MOZ_WIDGET_GTK ApplyGdkScreenFontOptions(aPattern); #endif @@ -1965,15 +1959,11 @@ CreateScaledFont(FcPattern *aPattern, cairo_font_face_t *aFace) // font will be used, but currently we don't have different gfxFonts for // different surface font_options, so we'll create a font suitable for the // Screen. Image and xlib surfaces default to CAIRO_HINT_METRICS_ON. -#ifdef MOZ_GFX_OPTIMIZE_MOBILE - cairo_font_options_set_hint_metrics(fontOptions, CAIRO_HINT_METRICS_OFF); -#else if (printing) { cairo_font_options_set_hint_metrics(fontOptions, CAIRO_HINT_METRICS_OFF); } else { cairo_font_options_set_hint_metrics(fontOptions, CAIRO_HINT_METRICS_ON); } -#endif // The remaining options have been recorded on the pattern and the face. // _cairo_ft_options_merge has some logic to decide which options from the @@ -1998,11 +1988,10 @@ CreateScaledFont(FcPattern *aPattern, cairo_font_face_t *aFace) // // Fallback values here mirror treatment of defaults in cairo-ft-font.c. FcBool hinting = FcFalse; -#ifndef MOZ_GFX_OPTIMIZE_MOBILE if (FcPatternGetBool(aPattern, FC_HINTING, 0, &hinting) != FcResultMatch) { hinting = FcTrue; } -#endif + cairo_hint_style_t hint_style; if (printing || !hinting) { hint_style = CAIRO_HINT_STYLE_NONE; diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index ec56f79e4cc1..767f1b9bf729 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -3345,8 +3345,6 @@ pref("layout.css.scroll-behavior.property-enabled", false); #if defined(ANDROID) || defined(FXOS_SIMULATOR) // font names -pref("font.alias-list", "sans,sans-serif,serif,monospace"); - // Gonk (along with FxOS Simulator) and Android ship different sets of fonts #if defined(MOZ_WIDGET_GONK) || defined(FXOS_SIMULATOR) @@ -3569,8 +3567,6 @@ pref("print.print_extra_margin", 0); // twips // font names -pref("font.alias-list", "sans,sans-serif,serif,monospace"); - pref("font.size.fixed.ar", 12); pref("font.name.serif.el", "serif");