summaryrefslogtreecommitdiffstats
path: root/skia/ext
diff options
context:
space:
mode:
Diffstat (limited to 'skia/ext')
-rw-r--r--skia/ext/SkFontHost_fontconfig_direct.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/skia/ext/SkFontHost_fontconfig_direct.cpp b/skia/ext/SkFontHost_fontconfig_direct.cpp
index 43a8f00..9fd1252 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 =