shithub: freetype+ttf2subf

Download patch

ref: 2ef3e0f1cd299d96bfcc02ffaa349bd8491c719c
parent: 72a0dd247d80541041da5aacad7d5bcc0d9e52ba
author: David Turner <[email protected]>
date: Mon Feb 12 16:28:21 EST 2007

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

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2007-02-12  David Turner  <[email protected]>
 
+	* 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  <[email protected]>
 
 	* 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  <[email protected]>
 
 	* docs/CHANGES, docs/INSTALL.MAC: Improvements.
@@ -283,9 +288,12 @@
 	* 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  <[email protected]>
 
 2007-01-12  Werner Lemberg  <[email protected]>
 
--- 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;