shithub: freetype+ttf2subf

Download patch

ref: b463665febad10037c64708f134676707817abe6
parent: ae1e4b15779e692d064799aec4470b8f2414212d
author: David Turner <[email protected]>
date: Sun Feb 26 02:57:45 EST 2006

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

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-02-26  David Turner  <[email protected]>
+
+    * 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  <[email protected]>
 
 	* devel/ftoption.h: Synchronize with
--- 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
   }