freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master a3b6125: [truetype] Fix GX delta tracing.


From: Werner LEMBERG
Subject: [freetype2] master a3b6125: [truetype] Fix GX delta tracing.
Date: Sat, 16 Jul 2016 06:23:53 +0000 (UTC)

branch: master
commit a3b61253a7001a664c68ce0233047bd121330534
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>

    [truetype] Fix GX delta tracing.
    
    * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Trace
    relative point movements.
---
 ChangeLog              |    9 ++++++++-
 src/truetype/ttgxvar.c |   40 ++++++++++++++++++++--------------------
 2 files changed, 28 insertions(+), 21 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 9ae3ce6..5b9df4a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,11 @@
-2016-07-14  Behdad Esfahbod  <address@hidden>
+2016-07-16  Werner Lemberg  <address@hidden>
+
+       [truetype] Fix GX delta tracing.
+
+       * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Trace
+       relative point movements.
+
+2016-07-16  Behdad Esfahbod  <address@hidden>
 
        [truetype] More fixes for GX.
 
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c
index 1a57153..1ddaa0d 100644
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -2018,22 +2018,20 @@
         /* this means that there are deltas for every point in the glyph */
         for ( j = 0; j < n_points; j++ )
         {
-#ifdef FT_DEBUG_LEVEL_TRACE
-          FT_Vector  point_org = points_org[j];
-#endif
+          FT_Pos  delta_x = FT_MulFix( deltas_x[j], apply );
+          FT_Pos  delta_y = FT_MulFix( deltas_y[j], apply );
 
 
-          outline->points[j].x += FT_MulFix( deltas_x[j], apply );
-          outline->points[j].y += FT_MulFix( deltas_y[j], apply );
+          outline->points[j].x += delta_x;
+          outline->points[j].y += delta_y;
 
 #ifdef FT_DEBUG_LEVEL_TRACE
-          if ( ( point_org.x != outline->points[j].x ) ||
-               ( point_org.y != outline->points[j].y ) )
+          if ( delta_x || delta_y )
           {
             FT_TRACE7(( "      %d: (%d, %d) -> (%d, %d)\n",
                         j,
-                        point_org.x,
-                        point_org.y,
+                        outline->points[j].x - delta_x,
+                        outline->points[j].y - delta_y,
                         outline->points[j].x,
                         outline->points[j].y ));
             count++;
@@ -2086,30 +2084,32 @@
                                points_org,
                                has_delta );
 
+        FT_TRACE7(( "    point deltas:\n" ));
+
         for ( j = 0; j < n_points; j++ )
         {
-          outline->points[j].x += points_out[j].x - points_org[j].x;
-          outline->points[j].y += points_out[j].y - points_org[j].y;
-        }
+          FT_Pos  delta_x = points_out[j].x - points_org[j].x;
+          FT_Pos  delta_y = points_out[j].y - points_org[j].y;
 
-#ifdef FT_DEBUG_LEVEL_TRACE
-        FT_TRACE7(( "    point deltas:\n" ));
 
-        for ( j = 0; j < n_points; j++)
-        {
-          if ( ( points_org[j].x != outline->points[j].x ) ||
-               ( points_org[j].y != outline->points[j].y ) )
+          outline->points[j].x += delta_x;
+          outline->points[j].y += delta_y;
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+          if ( delta_x || delta_y )
           {
             FT_TRACE7(( "      %d: (%d, %d) -> (%d, %d)\n",
                         j,
-                        points_org[j].x,
-                        points_org[j].y,
+                        outline->points[j].x - delta_x,
+                        outline->points[j].y - delta_y,
                         outline->points[j].x,
                         outline->points[j].y ));
             count++;
           }
+#endif
         }
 
+#ifdef FT_DEBUG_LEVEL_TRACE
         if ( !count )
           FT_TRACE7(( "      none\n" ));
 #endif



reply via email to

[Prev in Thread] Current Thread [Next in Thread]