diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-19 20:23:04 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-19 20:23:04 +0000 |
commit | 990000e307fe52b5a27f9a93dcab89f8b449beec (patch) | |
tree | 796c4c80555dcdcc1359b52b2785525c8ef3934d /skia | |
parent | a883abac6b4ef01883f84ca839c7d2dce7fd45cd (diff) | |
download | chromium_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')
-rw-r--r-- | skia/ports/SkFontHost_fontconfig.cpp | 9 |
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); |