summaryrefslogtreecommitdiffstats
path: root/skia/ports
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-19 20:23:04 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-19 20:23:04 +0000
commit990000e307fe52b5a27f9a93dcab89f8b449beec (patch)
tree796c4c80555dcdcc1359b52b2785525c8ef3934d /skia/ports
parenta883abac6b4ef01883f84ca839c7d2dce7fd45cd (diff)
downloadchromium_src-990000e307fe52b5a27f9a93dcab89f8b449beec.zip
chromium_src-990000e307fe52b5a27f9a93dcab89f8b449beec.tar.gz
chromium_src-990000e307fe52b5a27f9a93dcab89f8b449beec.tar.bz2
Match Windows font metrics on Linux.
With this change, many layout tests involving text match render trees exactly. By turning off anti-aliasing we also almost match pixel exact. There are a couple of single-pixel differences between Win32 font rendering and FreeType however (see the bottom left pixel of an 'a' glyph for example), so we aren't quite pixel-for-pixel yet. Mike Reed expects to redo much of the font configuration code in Skia to cope with complex text and subpixel text so, for now, I'm not going to have anti-aliasing be a command line flag etc. Review URL: http://codereview.chromium.org/11284 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5704 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/ports')
-rw-r--r--skia/ports/SkFontHost_fontconfig.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/skia/ports/SkFontHost_fontconfig.cpp b/skia/ports/SkFontHost_fontconfig.cpp
index cb95a60..f36bb2e 100644
--- a/skia/ports/SkFontHost_fontconfig.cpp
+++ b/skia/ports/SkFontHost_fontconfig.cpp
@@ -278,13 +278,8 @@ void SkFontHost::Serialize(const SkTypeface*, SkWStream*) {
SkScalerContext* SkFontHost::CreateFallbackScalerContext
(const SkScalerContext::Rec& rec) {
- FcPattern* pattern = FcPatternCreate();
- FcConfigSubstitute(0, pattern, FcMatchPattern);
- FcDefaultSubstitute(pattern);
-
- FcResult result;
- FcPattern* match = FcFontMatch(0, pattern, &result);
- FcPatternDestroy(pattern);
+ FcPattern* match = FontMatch(FC_FAMILY, FcTypeString, "serif",
+ NULL);
// This will fail when we have no fonts on the system.
SkASSERT(match);