From 368b4e7649f9bc8c6bebf7c7ff03c9b9ec425a25 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 6 Aug 2012 23:06:04 -0400 Subject: [PATCH] Minor --- src/hb-font.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/hb-font.cc b/src/hb-font.cc index f0683e4d3..409b9e888 100644 --- a/src/hb-font.cc +++ b/src/hb-font.cc @@ -200,7 +200,6 @@ hb_font_get_glyph_name_nil (hb_font_t *font, if (font->parent) return hb_font_get_glyph_name (font->parent, glyph, name, size); - snprintf (name, size, "gid%u", glyph); return false; } @@ -411,7 +410,10 @@ hb_font_get_glyph_name (hb_font_t *font, hb_codepoint_t glyph, 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