Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Unified Diff: skia/ext/SkFontHost_fontconfig_direct.cpp

Issue 131096: Only select scalable fonts.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/SkFontHost_fontconfig_direct.cpp
===================================================================
--- skia/ext/SkFontHost_fontconfig_direct.cpp (revision 18826)
+++ skia/ext/SkFontHost_fontconfig_direct.cpp (working copy)
@@ -118,6 +118,16 @@
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 =
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698