From 28c02b37684b41bf584ed81d910a448bdf9f706a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 29 Jul 2022 15:55:16 -0600 Subject: [PATCH] [ot-font] Minor simplification --- src/hb-ot-font.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hb-ot-font.cc b/src/hb-ot-font.cc index 3f13b9994..41941e15f 100644 --- a/src/hb-ot-font.cc +++ b/src/hb-ot-font.cc @@ -188,9 +188,10 @@ hb_ot_get_glyph_h_advances (hb_font_t* font, void* font_data, if (!use_cache) { + assert (!varStore_cache); for (unsigned int i = 0; i < count; i++) { - *first_advance = font->em_scale_x (hmtx.get_advance_with_var_unscaled (*first_glyph, font, varStore_cache)); + *first_advance = font->em_scale_x (hmtx.get_advance_with_var_unscaled (*first_glyph, font, nullptr)); first_glyph = &StructAtOffsetUnaligned (first_glyph, glyph_stride); first_advance = &StructAtOffsetUnaligned (first_advance, advance_stride); }