diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-26 23:21:45 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-26 23:21:45 +0000 |
commit | 653b2a10f65a1c1bd42f22998bc9ed3a0268b88f (patch) | |
tree | d6daa813c17dcaa287771883348f770d77ce687e /webkit/port | |
parent | 9b98c97f70bdbd19360c52af0c68672c3789446f (diff) | |
download | chromium_src-653b2a10f65a1c1bd42f22998bc9ed3a0268b88f.zip chromium_src-653b2a10f65a1c1bd42f22998bc9ed3a0268b88f.tar.gz chromium_src-653b2a10f65a1c1bd42f22998bc9ed3a0268b88f.tar.bz2 |
Linux: Match the tmMaxCharWidth of Windows exactly.
The metric used is totally wrong, it's much larger than the largest advance of
any glyph in the font. However, it's wrong in exactly the same way as Windows
is.
Review URL: http://codereview.chromium.org/12505
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6073 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port')
-rw-r--r-- | webkit/port/platform/graphics/chromium/FontCacheLinux.cpp | 2 | ||||
-rw-r--r-- | webkit/port/platform/graphics/chromium/SimpleFontDataLinux.cpp | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/webkit/port/platform/graphics/chromium/FontCacheLinux.cpp b/webkit/port/platform/graphics/chromium/FontCacheLinux.cpp index ab37374..b9aa718 100644 --- a/webkit/port/platform/graphics/chromium/FontCacheLinux.cpp +++ b/webkit/port/platform/graphics/chromium/FontCacheLinux.cpp @@ -96,7 +96,7 @@ FontPlatformData* FontCache::createFontPlatformData(const FontDescription& fontD style |= SkTypeface::kItalic; SkTypeface* tf = SkTypeface::Create(name, (SkTypeface::Style)style); - + FontPlatformData* result = new FontPlatformData(tf, fontDescription.computedSize(), diff --git a/webkit/port/platform/graphics/chromium/SimpleFontDataLinux.cpp b/webkit/port/platform/graphics/chromium/SimpleFontDataLinux.cpp index 7b8a75e..c5080c9 100644 --- a/webkit/port/platform/graphics/chromium/SimpleFontDataLinux.cpp +++ b/webkit/port/platform/graphics/chromium/SimpleFontDataLinux.cpp @@ -52,8 +52,7 @@ void SimpleFontData::platformInit() if (!glyphPageZero) return; - static const UChar32 M_char = 'M'; - m_maxCharWidth = widthForGlyph(glyphPageZero->glyphDataForCharacter(M_char).glyph); + m_maxCharWidth = SkScalarRound(metrics.fXRange * SkScalarRound(m_font.size())); if (metrics.fAvgCharWidth) { m_avgCharWidth = SkScalarRound(metrics.fAvgCharWidth); |