* src/truetype/ttgxvar.c (TT_Get_Var_Design): Zero extras.

Fixes #1436.
This commit is contained in:
Alexei Podtelezhnikov 2026-05-13 21:53:23 -04:00
parent 8fa928f161
commit 5a280ecde6

View file

@ -3453,9 +3453,7 @@
TT_Face ttface = (TT_Face)face;
FT_Error error = FT_Err_Ok;
GX_Blend blend;
FT_MM_Var* mmvar;
FT_Var_Axis* a;
FT_UInt i, nc;
FT_UInt i;
if ( !ttface->blend )
@ -3474,31 +3472,30 @@
return error;
}
nc = num_coords;
if ( num_coords > blend->num_axis )
{
FT_TRACE2(( "TT_Get_Var_Design:"
" only using first %u of %u coordinates\n",
blend->num_axis, num_coords ));
nc = blend->num_axis;
FT_ARRAY_ZERO( coords + blend->num_axis, num_coords - blend->num_axis );
num_coords = blend->num_axis;
}
mmvar = blend->mmvar;
a = mmvar->axis;
if ( ttface->doblend )
{
for ( i = 0; i < nc; i++, a++ )
for ( i = 0; i < num_coords; i++ )
coords[i] = blend->coords[i];
}
else
{
for ( i = 0; i < nc; i++, a++ )
FT_Var_Axis* a = blend->mmvar->axis;
for ( i = 0; i < num_coords; i++, a++ )
coords[i] = a->def;
}
for ( ; i < num_coords; i++, a++ )
coords[i] = a->def;
return FT_Err_Ok;
}