Index: ui/gfx/font_render_params_linux.cc |
diff --git a/ui/gfx/font_render_params_linux.cc b/ui/gfx/font_render_params_linux.cc |
index 4f9fbc98b857f59e6aadd1c91c066f3b5fbc4671..2384fbb26a30d91010511c53bcd515069b71d795 100644 |
--- a/ui/gfx/font_render_params_linux.cc |
+++ b/ui/gfx/font_render_params_linux.cc |
@@ -112,12 +112,10 @@ bool QueryFontconfig(const FontRenderParamsQuery& query, |
if (!match) |
return false; |
- if (family_out) { |
- FcChar8* family = NULL; |
- FcPatternGetString(match, FC_FAMILY, 0, &family); |
- if (family) |
- family_out->assign(reinterpret_cast<const char*>(family)); |
- } |
+ FcChar8* family = NULL; |
+ FcPatternGetString(match, FC_FAMILY, 0, &family); |
+ if (family && family_out) |
+ family_out->assign(reinterpret_cast<const char*>(family)); |
if (params_out) { |
FcBool fc_antialias = 0; |
@@ -149,6 +147,15 @@ bool QueryFontconfig(const FontRenderParamsQuery& query, |
int fc_rgba = FC_RGBA_NONE; |
if (FcPatternGetInteger(match, FC_RGBA, 0, &fc_rgba) == FcResultMatch) |
params_out->subpixel_rendering = ConvertFontconfigRgba(fc_rgba); |
+ |
+ // Some Vista fonts ship with embedded bitmaps. Make sure we don't use them |
+ // if antialiasing was requested: http://crbug.com/408059 |
+ if (params_out->antialiasing && family && |
+ (strcasecmp(reinterpret_cast<const char*>(family), "calibri") == 0 || |
+ strcasecmp(reinterpret_cast<const char*>(family), "cambria") == 0 || |
+ strcasecmp(reinterpret_cast<const char*>(family), "consolas") == 0)) { |
+ params_out->use_bitmaps = false; |
+ } |
} |
FcPatternDestroy(match); |