[font] Drop caches on variation changes

This commit is contained in:
Behdad Esfahbod 2022-06-28 13:46:04 -06:00
parent c90130e625
commit 33e3bf2d79
1 changed files with 4 additions and 1 deletions

View File

@ -1737,6 +1737,8 @@ _hb_font_adopt_var_coords (hb_font_t *font,
font->coords = coords; font->coords = coords;
font->design_coords = design_coords; font->design_coords = design_coords;
font->num_coords = coords_length; font->num_coords = coords_length;
font->mults_changed (); // Easiest to call this to drop cached data
} }
/** /**
@ -1766,7 +1768,6 @@ hb_font_create_sub_font (hb_font_t *parent)
font->x_scale = parent->x_scale; font->x_scale = parent->x_scale;
font->y_scale = parent->y_scale; font->y_scale = parent->y_scale;
font->slant = parent->slant; font->slant = parent->slant;
font->mults_changed ();
font->x_ppem = parent->x_ppem; font->x_ppem = parent->x_ppem;
font->y_ppem = parent->y_ppem; font->y_ppem = parent->y_ppem;
font->ptem = parent->ptem; font->ptem = parent->ptem;
@ -1789,6 +1790,8 @@ hb_font_create_sub_font (hb_font_t *parent)
} }
} }
font->mults_changed ();
return font; return font;
} }