From b463665febad10037c64708f134676707817abe6 Mon Sep 17 00:00:00 2001 From: David Turner Date: Sun, 26 Feb 2006 07:57:45 +0000 Subject: [PATCH] * src/base/ftobjs.c (ft_recompute_scaled_metrics): re-enable conservative rounding of metrics to avoid breaking clients like Pango (see http://bugzilla.gnome.org/show_bug.cgi?id=327852) --- ChangeLog | 6 ++++++ src/base/ftobjs.c | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/ChangeLog b/ChangeLog index 108525bba..16c650fa5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-02-26 David Turner + + * src/base/ftobjs.c (ft_recompute_scaled_metrics): re-enable conservative + rounding of metrics to avoid breaking clients like Pango + (see http://bugzilla.gnome.org/show_bug.cgi?id=327852) + 2006-02-25 Werner Lemberg * devel/ftoption.h: Synchronize with diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index 6ed420a4f..c237d6581 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -2063,6 +2063,19 @@ { /* Compute root ascender, descender, test height, and max_advance */ +#if 1 + metrics->ascender = FT_PIX_CEIL( FT_MulFix( face->ascender, + metrics->y_scale ) ); + + metrics->descender = FT_PIX_FLOOR( FT_MulFix( face->descender, + metrics->y_scale ) ); + + metrics->height = FT_PIX_ROUND( FT_MulFix( face->height, + metrics->y_scale ) ); + + metrics->max_advance = FT_PIX_ROUND( FT_MulFix( face->max_advance_width, + metrics->x_scale ) ); +#else metrics->ascender = FT_MulFix( face->ascender, metrics->y_scale ); @@ -2074,6 +2087,7 @@ metrics->max_advance = FT_MulFix( face->max_advance_width, metrics->x_scale ); +#endif }