diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-04-04 16:44:05 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-04-04 16:52:03 +0200 |
commit | a1c34c0224d32ed4f9f2909863e8ac907c94524d (patch) | |
tree | 9e8994c0db2b8f105a022e23b24735670665fba3 /source/fitz/font.c | |
parent | 9dc58cc827521b11d4eb8e2dd14e7e26bef74edb (diff) | |
download | mupdf-a1c34c0224d32ed4f9f2909863e8ac907c94524d.tar.xz |
Add glyph names to trace device output.
Diffstat (limited to 'source/fitz/font.c')
-rw-r--r-- | source/fitz/font.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/fitz/font.c b/source/fitz/font.c index cd5c7648..392e5a71 100644 --- a/source/fitz/font.c +++ b/source/fitz/font.c @@ -1401,6 +1401,23 @@ fz_advance_t3_glyph(fz_context *ctx, fz_font *font, int gid) return font->t3widths[gid]; } +void +fz_get_glyph_name(fz_context *ctx, fz_font *font, int glyph, char *buf, int size) +{ + FT_Face face = font->ft_face; + if (face) + { + if (FT_HAS_GLYPH_NAMES(face)) + FT_Get_Glyph_Name(face, glyph, buf, size); + else + fz_snprintf(buf, size, "%d", glyph); + } + else + { + fz_snprintf(buf, size, "%d", glyph); + } +} + float fz_advance_glyph(fz_context *ctx, fz_font *font, int gid, int wmode) { |