summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--skia/ext/SkFontHost_fontconfig_direct.cpp14
-rw-r--r--webkit/api/src/gtk/WebFontInfo.cpp4
2 files changed, 8 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 =
diff --git a/webkit/api/src/gtk/WebFontInfo.cpp b/webkit/api/src/gtk/WebFontInfo.cpp
index 2485022..264efff 100644
--- a/webkit/api/src/gtk/WebFontInfo.cpp
+++ b/webkit/api/src/gtk/WebFontInfo.cpp
@@ -58,6 +58,10 @@ WebString WebFontInfo::familyForChars(const WebUChar* characters, size_t numChar
fcvalue.u.c = cset;
FcPatternAdd(pattern, FC_CHARSET, fcvalue, 0);
+ fcvalue.type = FcTypeBool;
+ fcvalue.u.b = FcTrue;
+ FcPatternAdd(pattern, FC_SCALABLE, fcvalue, 0);
+
FcConfigSubstitute(0, pattern, FcMatchPattern);
FcDefaultSubstitute(pattern);