freetype-commit
[Top][All Lists]
Advanced

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

[freetype2] master 0f9ddf2 3/6: [truetype] Fix gxvar delta interpolation


From: Werner LEMBERG
Subject: [freetype2] master 0f9ddf2 3/6: [truetype] Fix gxvar delta interpolation.
Date: Thu, 14 Jul 2016 13:02:35 +0000 (UTC)

branch: master
commit 0f9ddf20c89fd38bec244d431340d1d67d4dbfd5
Author: Behdad Esfahbod <address@hidden>
Commit: Werner Lemberg <address@hidden>

    [truetype] Fix gxvar delta interpolation.
    
    The coordinates of the base font should be used for interpolation
    purposes, NOT the current points (i.e., the result of accumulation
    of previous deltas).
    
    * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Initialize
    `points_org' before looping over all tuples.
---
 ChangeLog              |   11 +++++++++++
 src/truetype/ttgxvar.c |    6 +++---
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a3d78f6..40560ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2016-07-14  Behdad Esfahbod  <address@hidden>
+
+       [truetype] Fix gxvar delta interpolation.
+
+       The coordinates of the base font should be used for interpolation
+       purposes, NOT the current points (i.e., the result of accumulation
+       of previous deltas).
+
+       * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Initialize
+       `points_org' before looping over all tuples.
+
 2016-07-12  Werner Lemberg  <address@hidden>
 
        * Version 2.6.5 released.
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c
index 9a02c5a..d771569 100644
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -1922,6 +1922,9 @@
     FT_TRACE5(( "gvar: there are %d tuples:\n",
                 tupleCount & GX_TC_TUPLE_COUNT_MASK ));
 
+    for ( j = 0; j < n_points; j++ )
+      points_org[j] = outline->points[j];
+
     for ( i = 0; i < ( tupleCount & GX_TC_TUPLE_COUNT_MASK ); i++ )
     {
       FT_UInt   tupleDataSize;
@@ -2057,10 +2060,7 @@
         /* we have to interpolate the missing deltas similar to the */
         /* IUP bytecode instruction                                 */
         for ( j = 0; j < n_points; j++ )
-        {
-          points_org[j] = outline->points[j];
           has_delta[j]  = FALSE;
-        }
 
         for ( j = 0; j < point_count; j++ )
         {



reply via email to

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