diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-06 01:07:55 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-06 01:07:55 +0000 |
commit | b87ecb46e78cd4298a11181f0976d3be34ae48f6 (patch) | |
tree | 18ff8ef294884d6bad0d347fb0eb7d159c12175d /skia | |
parent | be7066ca3fd6190dfc2479fa0b423fd28494fd7a (diff) | |
download | chromium_src-b87ecb46e78cd4298a11181f0976d3be34ae48f6.zip chromium_src-b87ecb46e78cd4298a11181f0976d3be34ae48f6.tar.gz chromium_src-b87ecb46e78cd4298a11181f0976d3be34ae48f6.tar.bz2 |
Linux: FreeType doesn't scale OS/2 values
sxHeight values are in font units, not 26.6 fixed point as I assumed.
Review URL: http://codereview.chromium.org/13195
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6470 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
-rw-r--r-- | skia/ports/SkFontHost_FreeType.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/skia/ports/SkFontHost_FreeType.cpp b/skia/ports/SkFontHost_FreeType.cpp index 9564c53..5a18d51 100644 --- a/skia/ports/SkFontHost_FreeType.cpp +++ b/skia/ports/SkFontHost_FreeType.cpp @@ -812,7 +812,8 @@ void SkScalerContext_FreeType::generateFontMetrics(SkPaint::FontMetrics* mx, SkP SkScalar x_height; if (os2 && os2->sxHeight) { - x_height = static_cast<SkScalar>(os2->sxHeight) / 64; + x_height = (static_cast<SkScalar>(os2->sxHeight) / upem) * + (static_cast<SkScalar>(fScaleX) / 65536); } else { const FT_UInt x_glyph = FT_Get_Char_Index(fFace, 'x'); if (x_glyph) { |