shithub: freetype+ttf2subf

Download patch

ref: 00dfa3304e7275c1cba822ebd9e760b63d4601fd
parent: 0eb6316fde158730f6a50670435ad68d3e00286c
author: Werner Lemberg <[email protected]>
date: Tue Feb 5 14:23:16 EST 2013

[truetype] A better fix for Savannah bug #38211.

* src/truetype/ttinterp.c (Ins_IP): Implement identical behaviour to
MS rasterizer if rp1 == rp2 (confirmed by Greg Hitchcock).

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-02-05  Werner Lemberg  <[email protected]>
+
+	[truetype] A better fix for Savannah bug #38211.
+
+	* src/truetype/ttinterp.c (Ins_IP): Implement identical behaviour to
+	MS rasterizer if rp1 == rp2 (confirmed by Greg Hitchcock).
+
 2013-02-01  Alexei Podtelezhnikov  <[email protected]>
 
 	[pcf] Streamline parsing of PCF encoding table.
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -6979,11 +6979,17 @@
           new_dist = FT_MulDiv( org_dist, cur_range, old_range );
         else
         {
-          /* use the middle position */
-          new_dist = cur_dist -
-                     CUR_fast_dualproj( &CUR.zp2.cur[point] ) +
-                     ( CUR_fast_dualproj( &CUR.zp1.cur[CUR.GS.rp1] ) +
-                       CUR_fast_dualproj( &CUR.zp1.cur[CUR.GS.rp2] ) ) / 2;
+          /* This is the same as what MS does for the invalid case:  */
+          /*                                                         */
+          /*   delta = (Original_Pt - Original_RP1) -                */
+          /*           (Current_Pt - Current_RP1)                    */
+          /*                                                         */
+          /* In FreeType speak:                                      */
+          /*                                                         */
+          /*   new_dist = cur_dist -                                 */
+          /*              org_dist - cur_dist;                       */
+
+          new_dist = -org_dist;
         }
       }
       else