[cff1] Return no name for out-of-range glyph IDs

Was returning .notdef before.
This commit is contained in:
Behdad Esfahbod 2023-01-24 18:30:49 -07:00
parent c89aebc40b
commit 64ed03c9be
1 changed files with 1 additions and 0 deletions

View File

@ -1344,6 +1344,7 @@ struct cff1
bool get_glyph_name (hb_codepoint_t glyph,
char *buf, unsigned int buf_len) const
{
if (unlikely (glyph >= num_glyphs)) return false;
if (unlikely (!is_valid ())) return false;
if (is_CID()) return false;
if (unlikely (!buf_len)) return true;