[cairo-commit] 2 commits - configure.in src/cairo-atsui-font.c

Brian Ewins brianewins at kemper.freedesktop.org
Mon Nov 5 02:21:42 PST 2007


 configure.in           |    2 +-
 src/cairo-atsui-font.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 4270cd3358fabf0d3e6ac4e866099b172082b592
Author: Richard Hult <richard at imendio.com>
Date:   Mon Nov 5 10:05:07 2007 +0000

    [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).

diff --git a/src/cairo-atsui-font.c b/src/cairo-atsui-font.c
index f3cf8a5..1c96fdc 100644
--- a/src/cairo-atsui-font.c
+++ b/src/cairo-atsui-font.c
@@ -221,7 +221,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. */
commit 3141b21c0c581dabc09a6ec9cdf0a071701b0e42
Author: Brian Ewins <Brian.Ewins at gmail.com>
Date:   Mon Nov 5 10:05:04 2007 +0000

    [configure.in] fix atsui experimental warning
    
    The 'experimental' warning for atsui was appearing
    for --enable-quartz not --enable-atsui as it should.

diff --git a/configure.in b/configure.in
index 8b433fc..355e47e 100644
--- a/configure.in
+++ b/configure.in
@@ -1055,7 +1055,7 @@ if test x"$use_quartz" = "xyes" ; then
    echo "$WARNING_MESSAGE" | sed 's/@BACKEND@/Quartz/'
 fi
 
-if test x"$use_quartz" = "xyes" ; then
+if test x"$use_atsui" = "xyes" ; then
    echo "$WARNING_MESSAGE" | sed 's/@BACKEND@/ATSUI/'
 fi
 


More information about the cairo-commit mailing list