From 14ad96ffbf77c33d8d33d2686d17c2375381989e Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Mon, 28 Oct 2019 12:56:04 -0700 Subject: [PATCH] Don't include codepoint 0 in the results of collect_unicodes. It is always assumed to be the notdef glyph. --- src/hb-ot-cmap-table.hh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/hb-ot-cmap-table.hh b/src/hb-ot-cmap-table.hh index e66461529..37d3378d7 100644 --- a/src/hb-ot-cmap-table.hh +++ b/src/hb-ot-cmap-table.hh @@ -1324,7 +1324,13 @@ struct cmap } void collect_unicodes (hb_set_t *out) const - { subtable->collect_unicodes (out); } + { + subtable->collect_unicodes (out); + // Never include unicode codepoint 0 in the set. + // This is assumed to be the notdef glyph. + out->del (0); + } + void collect_variation_selectors (hb_set_t *out) const { subtable_uvs->collect_variation_selectors (out); } void collect_variation_unicodes (hb_codepoint_t variation_selector,