summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium/src/gtk/WebFontInfo.cpp
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-07-22 15:37:06 +0100
committerBen Murdoch <benm@google.com>2010-07-27 10:20:25 +0100
commit967717af5423377c967781471ee106e2bb4e11c8 (patch)
tree1e701dc0a12f7f07cce1df4a7681717de77a211b /WebKit/chromium/src/gtk/WebFontInfo.cpp
parentdcc30a9fca45f634b1d3a12b276d3a0ccce99fc3 (diff)
downloadexternal_webkit-967717af5423377c967781471ee106e2bb4e11c8.zip
external_webkit-967717af5423377c967781471ee106e2bb4e11c8.tar.gz
external_webkit-967717af5423377c967781471ee106e2bb4e11c8.tar.bz2
Merge WebKit at r63859 : Initial merge by git.
Change-Id: Ie8096c63ec7c991c9a9cba8bdd9c3b74a3b8ed62
Diffstat (limited to 'WebKit/chromium/src/gtk/WebFontInfo.cpp')
-rw-r--r--WebKit/chromium/src/gtk/WebFontInfo.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/WebKit/chromium/src/gtk/WebFontInfo.cpp b/WebKit/chromium/src/gtk/WebFontInfo.cpp
index 3ac0b00..dd25eb1 100644
--- a/WebKit/chromium/src/gtk/WebFontInfo.cpp
+++ b/WebKit/chromium/src/gtk/WebFontInfo.cpp
@@ -165,6 +165,23 @@ void WebFontInfo::renderStyleForStrike(const char* family, int sizeAndStyle, Web
out->useHinting = b;
if (FcPatternGetInteger(match, FC_HINT_STYLE, 0, &i) == FcResultMatch)
out->hintStyle = i;
+ if (FcPatternGetInteger(match, FC_RGBA, 0, &i) == FcResultMatch) {
+ switch (i) {
+ case FC_RGBA_NONE:
+ out->useSubpixel = 0;
+ break;
+ case FC_RGBA_RGB:
+ case FC_RGBA_BGR:
+ case FC_RGBA_VRGB:
+ case FC_RGBA_VBGR:
+ out->useSubpixel = 1;
+ break;
+ default:
+ // This includes FC_RGBA_UNKNOWN.
+ out->useSubpixel = 2;
+ break;
+ }
+ }
FcPatternDestroy(match);
}