Commit 74c34eba3978554ef2628a6547e793c47e807365

David Turner 2007-03-18T07:19:31

another bytecode interpreter regression fix

diff --git a/ChangeLog b/ChangeLog
index 38ab6dc..673e589 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-03-18  David Turner   <david@freetype.org>
+
+	* src/truetype/ttinterp.c (Ins_MDRP): another bytecode
+	regression fix; testing still needed
+
 2007-03-17  David Turner   <david@freetype.org>
 
 	* src/truetype/ttinterp.c (Ins_IP): fixing wrong handling
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index 91129c1..469c372 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -4844,7 +4844,7 @@
                          CUR.twilight.n_points );
 
         /* get scaled orus coordinates */
-        vec1.x = TT_MULFIX( CUR.zp0.orus[L].x - CUR.zp1.orus[K].x,
+        vec1.x = TT_MULFIX( CUR.zp0.org[L].x - CUR.zp1.orus[K].x,
                             CUR.metrics.x_scale );
         vec1.y = TT_MULFIX( CUR.zp0.orus[L].y - CUR.zp1.orus[L].y,
                             CUR.metrics.y_scale );
@@ -5780,16 +5780,21 @@
 
 #ifdef FIX_BYTECODE
 
+    /* UNDOCUMENTED: twilight zone special case */
+
+    if ( CUR.GS.gep0 == 0 || CUR.GS.gep1 == 0 )
+    {
+      FT_Vector*  vec1 = &CUR.zp1.org[point];
+      FT_Vector*  vec2 = &CUR.zp0.org[CUR.GS.rp0];
+
+      org_dist = CUR_Func_dualproj( vec1, vec2 );
+    }
+    else
     {
       FT_Vector*  vec1 = &CUR.zp1.orus[point];
       FT_Vector*  vec2 = &CUR.zp0.orus[CUR.GS.rp0];
 
 
-      if ( CUR.GS.gep0 == 0 || CUR.GS.gep1 == 0 )
-        FT_ARRAY_COPY( CUR.twilight.orus,
-                       CUR.twilight.org,
-                       CUR.twilight.n_points );
-
       if ( CUR.metrics.x_scale == CUR.metrics.y_scale )
       {
         /* this should be faster */