freetype-commit
[Top][All Lists]
Advanced

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

[freetype2] master 8183eeb: [truetype] Fix GX variation handling of comp


From: Werner LEMBERG
Subject: [freetype2] master 8183eeb: [truetype] Fix GX variation handling of composites.
Date: Sat, 6 Aug 2016 21:14:16 +0000 (UTC)

branch: master
commit 8183eeb18d91513cfc8b70eba9c4a818748792dc
Author: Behdad Esfahbod <address@hidden>
Commit: Werner Lemberg <address@hidden>

    [truetype] Fix GX variation handling of composites.
    
    * src/truetype/ttgload.c (load_truetype_glyph)
    [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check `ARGS_ARE_XY_VALUES' flag.
---
 ChangeLog              |    7 +++++++
 src/truetype/ttgload.c |   10 +++++-----
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b0953dd..130c1ee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2016-07-16  Behdad Esfahbod  <address@hidden>
+
+       [truetype] Fix GX variation handling of composites.
+
+       * src/truetype/ttgload.c (load_truetype_glyph)
+       [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check `ARGS_ARE_XY_VALUES' flag.
+
 2016-08-05  Alexei Podtelezhnikov  <address@hidden>
 
        [smooth] Minor refactoring.
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index cb99c7e..6f9b725 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -1807,11 +1807,11 @@
 
         for ( i = 0; i < limit; i++, subglyph++ )
         {
-          /* XXX: overflow check for subglyph->{arg1,arg2}.         */
-          /*      Deltas must be within signed 16-bit,              */
-          /*      but the restriction of summed deltas is not clear */
-          subglyph->arg1 = (FT_Int16)points[i].x;
-          subglyph->arg2 = (FT_Int16)points[i].y;
+          if ( subglyph->flags & ARGS_ARE_XY_VALUES )
+          {
+            subglyph->arg1 = (FT_Int16)points[i].x;
+            subglyph->arg2 = (FT_Int16)points[i].y;
+          }
         }
 
         loader->pp1.x = points[i + 0].x;



reply via email to

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