[glyf/VarComposite] Clamp axis coordinates

This commit is contained in:
Behdad Esfahbod 2022-10-18 13:38:12 -06:00
parent a975be4c07
commit 13deea7cbd
1 changed files with 3 additions and 1 deletions

View File

@ -238,7 +238,9 @@ struct VarCompositeGlyphRecord
for (unsigned i = 0; i < count; i++)
{
unsigned axis_index = axis_width == 1 ? *p++ : *q++;
setter[axis_index] = axis_points[i].x;
signed v = axis_points[i].x;
v = hb_clamp (v, -(1<<14), (1<<14));
setter[axis_index] = v;
}
}