diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-04 01:30:08 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-04 01:30:08 +0000 |
commit | 7accba0ab620be684308e40ff342c3a57bbd9241 (patch) | |
tree | 0a48a322626f9ff7e1ea304ec69f2baca52b14bf /skia/include | |
parent | 2ecc3274a76dd709e2aaf74d385f57b499d843b5 (diff) | |
download | chromium_src-7accba0ab620be684308e40ff342c3a57bbd9241.zip chromium_src-7accba0ab620be684308e40ff342c3a57bbd9241.tar.gz chromium_src-7accba0ab620be684308e40ff342c3a57bbd9241.tar.bz2 |
Linux: calculate fractional xheight
We need to push the calculation of the x-height into Skia. For one of
the layout tests, it assumes that 2.5ex of Ahem is exactly 32px.
Previously we calculated the x-height of Ahem to be 13px, so 2.5*13 was
33px.
Now we use the 26.6 fixed point number from freetype's hinter and turn
that directly into a floating point value (x-height is the only WebKit
metric which is a floating point value).
This lets us pass LayoutTests/css2.1/t1507-c526-font-sz-02-b-a.html
(although the Windows baseline is wrong)
Review URL: http://codereview.chromium.org/13112
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6344 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/include')
-rw-r--r-- | skia/include/SkPaint.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/skia/include/SkPaint.h b/skia/include/SkPaint.h index 9529dd0..cc6f760 100644 --- a/skia/include/SkPaint.h +++ b/skia/include/SkPaint.h @@ -592,6 +592,7 @@ public: // in units of em. It's used to calculate a value which // matches Windows's GetTextMetrics tmMaxCharWidth // member exactly. + SkScalar fXHeight; //!< the height of an 'x' in px, or 0 if no 'x' in face // VDMX values are exact ascent and descent values for scalable fonts at // a certain pixel size. |