summaryrefslogtreecommitdiffstats
path: root/skia
diff options
context:
space:
mode:
Diffstat (limited to 'skia')
-rw-r--r--skia/ext/SkFontHost_fontconfig_direct.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/skia/ext/SkFontHost_fontconfig_direct.cpp b/skia/ext/SkFontHost_fontconfig_direct.cpp
index cb21b0e..5d425c2 100644
--- a/skia/ext/SkFontHost_fontconfig_direct.cpp
+++ b/skia/ext/SkFontHost_fontconfig_direct.cpp
@@ -118,6 +118,16 @@ 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 =