From 33e3bf2d79c9b5598ba373ab093ec8b71404794b Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 28 Jun 2022 13:46:04 -0600 Subject: [PATCH] [font] Drop caches on variation changes --- src/hb-font.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hb-font.cc b/src/hb-font.cc index 51c55a6c9..8c4fe863b 100644 --- a/src/hb-font.cc +++ b/src/hb-font.cc @@ -1737,6 +1737,8 @@ _hb_font_adopt_var_coords (hb_font_t *font, font->coords = coords; font->design_coords = design_coords; 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->y_scale = parent->y_scale; font->slant = parent->slant; - font->mults_changed (); font->x_ppem = parent->x_ppem; font->y_ppem = parent->y_ppem; font->ptem = parent->ptem; @@ -1789,6 +1790,8 @@ hb_font_create_sub_font (hb_font_t *parent) } } + font->mults_changed (); + return font; }