Commit b463665febad10037c64708f134676707817abe6

David Turner 2006-02-26T07:57:45

* 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)

diff --git a/ChangeLog b/ChangeLog
index 108525b..16c650f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-02-26  David Turner  <david@freetype.org>
+
+    * 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  <wl@gnu.org>
 
 	* devel/ftoption.h: Synchronize with
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 6ed420a..c237d65 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
   }