diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-19 18:16:04 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-19 18:16:04 +0000 |
commit | 68a983963a8ef1718400bb7a7f177f5a26ae4656 (patch) | |
tree | 0ddc6d9d51cf9d70e0145d6dab88759d8bdda336 /skia | |
parent | 0fbde57962200fc5fb7b7c3b7bb283dca0b8133f (diff) | |
download | chromium_src-68a983963a8ef1718400bb7a7f177f5a26ae4656.zip chromium_src-68a983963a8ef1718400bb7a7f177f5a26ae4656.tar.gz chromium_src-68a983963a8ef1718400bb7a7f177f5a26ae4656.tar.bz2 |
Only select scalable fonts. Fixed-size fonts don't work with FT_Set_Char_Size in SkFontHost_FreeType.cpp.
BUG=13007
TEST=On Linux, visit url with { font-family: fixed; } on a computer with pcf fonts.
Review URL: http://codereview.chromium.org/131096
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18832 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
-rw-r--r-- | skia/ext/SkFontHost_fontconfig_direct.cpp | 10 |
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 = |