[COLR] Handle HB_OT_LAYOUT_NO_VARIATIONS_INDEX

This commit is contained in:
Behdad Esfahbod 2022-12-11 21:05:14 -07:00
parent 9a3f0be291
commit ff332b14ea
1 changed files with 1 additions and 1 deletions

View File

@ -941,7 +941,7 @@ struct ClipBox
extents->width = u.format1.xMax - u.format1.xMin;
extents->height = u.format1.yMin - u.format1.yMax;
if (u.format == 2 && coords)
if (u.format == 2 && coords && u.format2.varIdxBase != HB_OT_LAYOUT_NO_VARIATIONS_INDEX)
{
uint32_t varIdx = u.format2.varIdxBase;
extents->x_bearing += _hb_roundf (varStore.get_delta (varIdx , coords));