summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-10 01:22:39 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-10 01:22:39 +0000
commit1e2787f96182fedaf7be62ccf041a8406fa23f8d (patch)
tree5b9720932d650dcda418c84dafd1e0580307ac47 /webkit
parentd656353ede2f6a439d12d5fe7b5ac338e2a35fa4 (diff)
downloadchromium_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.cpp4
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);