diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2017-10-30 15:43:43 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2017-11-22 23:09:51 +0100 |
commit | 46fe810563b4ca04b9804fd1163d22ca76cfa4ac (patch) | |
tree | 971ce378ece4fc75d1b1b51694d255230e4e42aa /source/fitz/font.c | |
parent | 005820fade8f1bdfc0ae733b796dc6a3a4c3284e (diff) | |
download | mupdf-46fe810563b4ca04b9804fd1163d22ca76cfa4ac.tar.xz |
Warn on irretrievable glyph name.
Diffstat (limited to 'source/fitz/font.c')
-rw-r--r-- | source/fitz/font.c | 6 |
1 files changed, 5 insertions, 1 deletions
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); } |