From f567b5561928e713737edc4655c6532ea6138a1d Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 15 Feb 2022 18:26:43 -0600 Subject: [PATCH] [face] Use max numGlyphs of maxp and loca --- src/hb-static.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/hb-static.cc b/src/hb-static.cc index 4d486241a..bd698814e 100644 --- a/src/hb-static.cc +++ b/src/hb-static.cc @@ -85,12 +85,10 @@ hb_face_t::load_num_glyphs () const unsigned ret = 0; #ifndef HB_NO_BORING_EXPANSION - if (!ret) - ret = load_num_glyphs_from_loca (this); + ret = hb_max (ret, load_num_glyphs_from_loca (this)); #endif - if (!ret) - ret = load_num_glyphs_from_maxp (this); + ret = hb_max (ret, load_num_glyphs_from_maxp (this)); num_glyphs.set_relaxed (ret); return ret;