diff --git a/util/hb-info.cc b/util/hb-info.cc index d5a8292ba..eb9d7e8fd 100644 --- a/util/hb-info.cc +++ b/util/hb-info.cc @@ -860,9 +860,12 @@ retry: for (hb_codepoint_t u = HB_SET_VALUE_INVALID; hb_set_next (unicodes, &u);) { + /* A Default UVS range may list a codepoint that has no nominal + * mapping, and a Non-Default UVS mapping may point to glyph 0; + * both are collected above but do not resolve to a glyph. */ hb_codepoint_t gid = 0; - HB_UNUSED bool b = hb_font_get_variation_glyph (font, u, vs, &gid); - assert (b); + if (!hb_font_get_variation_glyph (font, u, vs, &gid)) + continue; char glyphname[128]; hb_font_glyph_to_string (font, gid, @@ -1122,6 +1125,14 @@ retry: for (unsigned feature_index = 0; feature_index < feature_count; feature_index++) { + hb_tag_t feature_tag = HB_TAG_NONE; + unsigned f_count = 1; + hb_ot_layout_table_get_feature_tags (face, table_tag, + feature_array[feature_index], + &f_count, &feature_tag); + if (!f_count) + continue; /* LangSys references a feature the FeatureList doesn't have. */ + hb_ot_name_id_t label_id; hb_ot_layout_feature_get_name_ids (face, @@ -1142,11 +1153,6 @@ retry: printf (" "); if (verbose) printf ("Feature: "); - hb_tag_t feature_tag; - unsigned f_count = 1; - hb_ot_layout_table_get_feature_tags (face, table_tag, - feature_array[feature_index], - &f_count, &feature_tag); printf ("%c%c%c%c", HB_UNTAG (feature_tag)); if (*name)