Fix hb-ft glyph name for broken fonts that return empty glyph names

This commit is contained in:
Behdad Esfahbod 2012-11-12 10:26:50 -08:00
parent 3bc22eb7b8
commit d05ac7dc3f
1 changed files with 1 additions and 1 deletions

View File

@ -242,7 +242,7 @@ hb_ft_get_glyph_name (hb_font_t *font HB_UNUSED,
FT_Face ft_face = (FT_Face) font_data;
hb_bool_t ret = !FT_Get_Glyph_Name (ft_face, glyph, name, size);
if (!ret)
if (!ret || (size && !*name))
snprintf (name, size, "gid%u", glyph);
return ret;