diff options
author | Richard Hult <richard@imendio.com> | 2007-11-05 10:05:07 +0000 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2007-11-26 21:24:54 -0800 |
commit | 476f888f4e38c63b535a06be77c49c2f4bdad010 (patch) | |
tree | b6fa4532fb7db211c21a86310dab454a7949addc | |
parent | 5c2ad5f69db5c685a3d5d9feeefb911df560bca3 (diff) |
[atsui] Use ascent+descent+leading to get the distance between baselines
The height is currently mapped to the atsui metrics property capHeight, which
is documented as "The height of a capital letter in the font from the baseline
to the top of the letter".
That doesn't match what height is in cairo, it should be the disctance between
baselines. This patch that fixes that (and makes webkit on GTK+ OS X
layout nicely).
(cherry picked from commit 4270cd3358fabf0d3e6ac4e866099b172082b592)
-rw-r--r-- | src/cairo-atsui-font.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cairo-atsui-font.c b/src/cairo-atsui-font.c index 589700e61..6d8586a3c 100644 --- a/src/cairo-atsui-font.c +++ b/src/cairo-atsui-font.c @@ -224,7 +224,7 @@ _cairo_atsui_font_set_metrics (cairo_atsui_font_t *font) extents.ascent = metrics.ascent; extents.descent = -metrics.descent; - extents.height = metrics.capHeight; + extents.height = extents.ascent + extents.descent + metrics.leading; extents.max_x_advance = metrics.maxAdvanceWidth; /* The FT backend doesn't handle max_y_advance either, so we'll ignore it for now. */ |