From 46fe810563b4ca04b9804fd1163d22ca76cfa4ac Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Mon, 30 Oct 2017 15:43:43 +0100 Subject: Warn on irretrievable glyph name. --- source/fitz/font.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/fitz/font.c b/source/fitz/font.c index 58a42314..e197fa1b 100644 --- a/source/fitz/font.c +++ b/source/fitz/font.c @@ -1527,7 +1527,11 @@ fz_get_glyph_name(fz_context *ctx, fz_font *font, int glyph, char *buf, int size if (face) { if (FT_HAS_GLYPH_NAMES(face)) - FT_Get_Glyph_Name(face, glyph, buf, size); + { + int fterr = FT_Get_Glyph_Name(face, glyph, buf, size); + if (fterr) + fz_warn(ctx, "freetype get glyph name (gid %d): %s", glyph, ft_error_string(fterr)); + } else fz_snprintf(buf, size, "%d", glyph); } -- cgit v1.2.3