mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 470440. Disable hinting on mobile to avoid some text spacing issues. r=karlt
This commit is contained in:
parent
00e316ca4e
commit
4d425088eb
@ -1739,12 +1739,17 @@ PrepareSortPattern(FcPattern *aPattern, double aFallbackSize,
|
||||
cairo_font_options_set_antialias (options, CAIRO_ANTIALIAS_GRAY);
|
||||
cairo_ft_font_options_substitute(options, aPattern);
|
||||
cairo_font_options_destroy(options);
|
||||
}
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
else {
|
||||
ApplyGdkScreenFontOptions(aPattern);
|
||||
}
|
||||
} 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_GTK2
|
||||
ApplyGdkScreenFontOptions(aPattern);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Protect against any fontconfig settings that may have incorrectly
|
||||
// modified the pixelsize, and consider aSizeAdjustFactor.
|
||||
@ -2521,7 +2526,11 @@ CreateScaledFont(FcPattern *aPattern)
|
||||
// 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
|
||||
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
|
||||
@ -2545,10 +2554,12 @@ CreateScaledFont(FcPattern *aPattern)
|
||||
// use the setting from the FcPattern.
|
||||
//
|
||||
// Fallback values here mirror treatment of defaults in cairo-ft-font.c.
|
||||
FcBool hinting;
|
||||
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 (!hinting) {
|
||||
hint_style = CAIRO_HINT_STYLE_NONE;
|
||||
|
Loading…
Reference in New Issue
Block a user