This commit is contained in:
Behdad Esfahbod 2012-08-06 23:06:04 -04:00
parent ade7459ea7
commit 368b4e7649
1 changed files with 4 additions and 2 deletions

View File

@ -200,7 +200,6 @@ hb_font_get_glyph_name_nil (hb_font_t *font,
if (font->parent) if (font->parent)
return hb_font_get_glyph_name (font->parent, glyph, name, size); return hb_font_get_glyph_name (font->parent, glyph, name, size);
snprintf (name, size, "gid%u", glyph);
return false; return false;
} }
@ -411,7 +410,10 @@ hb_font_get_glyph_name (hb_font_t *font,
hb_codepoint_t glyph, hb_codepoint_t glyph,
char *name, unsigned int size) char *name, unsigned int size)
{ {
return font->get_glyph_name (glyph, name, size); hb_bool_t ret = font->get_glyph_name (glyph, name, size);
if (!ret)
snprintf (name, size, "gid%u", glyph);
return ret;
} }
hb_bool_t hb_bool_t