[truetype] Fix TT_Set_Var_Design.

Reported by Nikolaus Waxweiler <madigens@gmail.com>.

* src/truetype/ttgxvar.c (TT_Set_Var_Design): Correctly handle the
case where we have less input coordinates than axes.
This commit is contained in:
Werner Lemberg 2017-06-10 11:29:24 +02:00
parent 2c4fba9c91
commit 5f2a72cbc7
2 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,12 @@
2017-06-10 Werner Lemberg <wl@gnu.org>
[truetype] Fix TT_Set_Var_Design.
Reported by Nikolaus Waxweiler <madigens@gmail.com>.
* 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 <wl@gnu.org>
* src/base/ftcalc.c (FT_DivFix): Fix embarrassing typo.

View File

@ -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 );