shithub: freetype+ttf2subf

Download patch

ref: 5f2a72cbc716703cd1e38f21e4cc52624a819e18
parent: 2c4fba9c91d31cacd7db3a684acee34276c8b5b5
author: Werner Lemberg <[email protected]>
date: Sat Jun 10 07:29:24 EDT 2017

[truetype] Fix TT_Set_Var_Design.

Reported by Nikolaus Waxweiler <[email protected]>.

* src/truetype/ttgxvar.c (TT_Set_Var_Design): Correctly handle the
case where we have less input coordinates than axes.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2017-06-10  Werner Lemberg  <[email protected]>
 
+	[truetype] Fix TT_Set_Var_Design.
+
+	Reported by Nikolaus Waxweiler <[email protected]>.
+
+	* src/truetype/ttgxvar.c (TT_Set_Var_Design): Correctly handle the
+	case where we have less input coordinates than axes.
+
+2017-06-10  Werner Lemberg  <[email protected]>
+
 	* src/base/ftcalc.c (FT_DivFix): Fix embarrassing typo.
 
 	Bug introduced 2017-05-28.
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -2640,7 +2640,7 @@
                  num_coords * sizeof ( FT_Fixed ) );
 
     a = mmvar->axis + num_coords;
-    c = coords + num_coords;
+    c = blend->coords + num_coords;
     for ( i = num_coords; i < mmvar->num_axis; i++, a++, c++ )
       *c = a->def;
 
@@ -2650,7 +2650,7 @@
     if ( !face->blend->avar_loaded )
       ft_var_load_avar( face );
 
-    ft_var_to_normalized( face, num_coords, coords, normalized );
+    ft_var_to_normalized( face, num_coords, blend->coords, normalized );
 
     error = tt_set_mm_blend( face, mmvar->num_axis, normalized, 0 );