Commit 582067dc921e012e256989b4b623fd3f4688358a

Werner Lemberg 2007-02-11T15:03:05

* src/autofit/afloader.c (af_loader_load_g): Don't change width for non-spacing glyphs.

diff --git a/ChangeLog b/ChangeLog
index 3bad4af..a84e9f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-02-11  Werner Lemberg  <wl@gnu.org>
+
+	* src/autofit/afloader.c (af_loader_load_g): Don't change width for
+	non-spacing glyphs.
+
 2007-02-07  Tom Parker  <palfrey@tevp.net>
 
 	* src/cff/cffdrivr.c (cff_get_name_index): Protect against NULL
diff --git a/src/autofit/afloader.c b/src/autofit/afloader.c
index 5dd9b04..c0eb9ba 100644
--- a/src/autofit/afloader.c
+++ b/src/autofit/afloader.c
@@ -422,7 +422,11 @@
                                                x_scale );
 #else
       if ( !FT_IS_FIXED_WIDTH( slot->face ) )
-        slot->metrics.horiAdvance = loader->pp2.x - loader->pp1.x;
+      {
+        /* non-spacing glyphs must stay as-is */
+        if ( slot->metrics.horiAdvance )
+          slot->metrics.horiAdvance = loader->pp2.x - loader->pp1.x;
+      }
       else
         slot->metrics.horiAdvance = FT_MulFix( slot->metrics.horiAdvance,
                                                metrics->scaler.x_scale );