Commit 2ef3e0f1cd299d96bfcc02ffaa349bd8491c719c

David Turner 2007-02-12T21:28:21

fix inter-letter spacing of auto-hinted glyphs (non-light modes)w

diff --git a/ChangeLog b/ChangeLog
index 2f6966a..9372ffb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2007-02-12  David Turner  <david@freetype.org>
 
+	* src/autofit/afloader.c: improve spacing adjustments for the
+	non-light auto-hinted modes. Gets rid of "inter-letter spacing
+	is too wide"
+
 	* src/truetype/ttinterp.h, src/truetype/ttinterp.c: simplify
 	projection and dual-projection code interface
 
@@ -12,7 +16,7 @@
 	get rid of various uses of strcpy and other "evil" functions,
 	as well as simplify a few things
 
-	
+
 2007-02-11  Werner Lemberg  <wl@gnu.org>
 
 	* src/autofit/afloader.c (af_loader_load_g): Don't change width for
@@ -241,6 +245,7 @@
 	src/pcf/pcfread.c (pcf_seek_to_table_type): Avoid possibly
 	uninitialized variables.
 
+>>>>>>> 1.1516
 2007-01-13  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
 
 	* docs/CHANGES, docs/INSTALL.MAC: Improvements.
@@ -283,12 +288,15 @@
 	* src/base/ftbitmap.c (ft_bitmap_assure_buffer): Fix memory stomping
 	bug in the bitmap emboldener if the pitch of the source bitmap is
 	much larger than its width.
+>>>>>>> 1.1484
 
 	* src/truetype/ttinterp.c (Update_Max): Fix aliasing-related
 	compilation warning.
 
 2007-01-12  Werner Lemberg  <wl@gnu.org>
 
+2007-01-12  Werner Lemberg  <wl@gnu.org>
+
 	* builds/unix/install-sh, builds/unix/mkinstalldirs: Updated from
 	`automake' CVS module from sources.redhat.com.
 
diff --git a/src/autofit/afloader.c b/src/autofit/afloader.c
index c0eb9ba..8f669f3 100644
--- a/src/autofit/afloader.c
+++ b/src/autofit/afloader.c
@@ -183,8 +183,8 @@
 
         if ( axis->num_edges > 1 && AF_HINTS_DO_ADVANCE( hints ) )
         {
-          old_advance = loader->pp2.x;
-          old_rsb     = old_advance - edge2->opos;
+          old_advance = loader->pp2.x - loader->pp1.x;
+          old_rsb     = loader->pp2.x - edge2->opos;
           old_lsb     = edge1->opos;
           new_lsb     = edge1->pos;
 
@@ -198,18 +198,18 @@
           /* for very small sizes                        */
 
           if ( old_lsb < 24 )
-            pp1x_uh -= 5;
+            pp1x_uh -= 8;
 
           if ( old_rsb < 24 )
-            pp2x_uh += 5;
+            pp2x_uh += 8;
 
           loader->pp1.x = FT_PIX_ROUND( pp1x_uh );
           loader->pp2.x = FT_PIX_ROUND( pp2x_uh );
 
-          if ( loader->pp1.x >= new_lsb )
+          if ( loader->pp1.x >= new_lsb && old_lsb > 0 )
             loader->pp1.x -= 64;
 
-          if ( loader->pp2.x <= pp2x_uh )
+          if ( loader->pp2.x <= edge2->pos && old_rsb > 0 )
             loader->pp2.x += 64;
 
           slot->lsb_delta = loader->pp1.x - pp1x_uh;