Index: skia/ext/SkFontHost_fontconfig_direct.cpp |
diff --git a/skia/ext/SkFontHost_fontconfig_direct.cpp b/skia/ext/SkFontHost_fontconfig_direct.cpp |
index 43a8f00dbce108724770cf1feb3167cb938e1140..9fd1252313a1e24c2064b21d8704c36de4f89647 100644 |
--- a/skia/ext/SkFontHost_fontconfig_direct.cpp |
+++ b/skia/ext/SkFontHost_fontconfig_direct.cpp |
@@ -76,6 +76,10 @@ bool FontConfigDirect::Match(std::string* result_family, |
fcvalue.u.i = is_italic && *is_italic ? FC_SLANT_ITALIC : FC_SLANT_ROMAN; |
FcPatternAdd(pattern, FC_SLANT, fcvalue, 0); |
+ fcvalue.type = FcTypeBool; |
+ fcvalue.u.b = FcTrue; |
+ FcPatternAdd(pattern, FC_SCALABLE, fcvalue, 0); |
+ |
FcConfigSubstitute(0, pattern, FcMatchPattern); |
FcDefaultSubstitute(pattern); |
@@ -117,16 +121,6 @@ bool FontConfigDirect::Match(std::string* result_family, |
return false; |
} |
- // Skip non-scalable fonts. They don't work with FT_Set_Char_Size() |
- // in SkFontHost_FreeType.cpp. |
- FcBool scalable = FcFalse; |
- FcPatternGetBool(match, FC_SCALABLE, 0, &scalable); |
- if (scalable != FcTrue) { |
- FcPatternDestroy(match); |
- FcPatternDestroy(pattern); |
- return false; |
- } |
- |
FcChar8* post_match_family; |
FcPatternGetString(match, FC_FAMILY, 0, &post_match_family); |
const bool family_names_match = |