diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-10 01:22:39 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-10 01:22:39 +0000 |
commit | 1e2787f96182fedaf7be62ccf041a8406fa23f8d (patch) | |
tree | 5b9720932d650dcda418c84dafd1e0580307ac47 /webkit | |
parent | d656353ede2f6a439d12d5fe7b5ac338e2a35fa4 (diff) | |
download | chromium_src-1e2787f96182fedaf7be62ccf041a8406fa23f8d.zip chromium_src-1e2787f96182fedaf7be62ccf041a8406fa23f8d.tar.gz chromium_src-1e2787f96182fedaf7be62ccf041a8406fa23f8d.tar.bz2 |
Linux: don't crash when performing font fallback to a non-scalable font.
Previously we were filtering out non-scalable fonts /after/ the fact.
This patch changes it so that we specify to fontconfig that it
shouldn't return non-scalable fonts to us.
We also duplicate this code into WebFontInfo so that we don't get
these issues when performing glyph-fallback.
http://codereview.chromium.org/149437
BUG=16403
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20351 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/api/src/gtk/WebFontInfo.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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); |