From aaef53a5d79f4b229ba8148d088d94b5b50f6761 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Mon, 28 Jul 2014 16:27:00 +0000 Subject: Don't try to added invalid CMap entries git-svn-id: svn://tug.org/texlive/trunk@34755 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/dvipdfm-x/ChangeLog | 3 +++ Build/source/texk/dvipdfm-x/tt_cmap.c | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog index 2eb07480406..6f6c4aab614 100644 --- a/Build/source/texk/dvipdfm-x/ChangeLog +++ b/Build/source/texk/dvipdfm-x/ChangeLog @@ -8,6 +8,9 @@ * dvi.c (do_pic_file): Don't insert the pic file while skimming reflected segments. + * tt_cmap.c (handle_subst_glyphs): Don't try to added invalid CMap + entries (regression from r34718). + 2014-07-28 Jiang Jiang * cid.c, pdfdev.c: Correct release of retained cff_charsets. diff --git a/Build/source/texk/dvipdfm-x/tt_cmap.c b/Build/source/texk/dvipdfm-x/tt_cmap.c index f49421e910a..229c6227b8e 100644 --- a/Build/source/texk/dvipdfm-x/tt_cmap.c +++ b/Build/source/texk/dvipdfm-x/tt_cmap.c @@ -877,7 +877,7 @@ handle_subst_glyphs (CMap *cmap, post = tt_read_post_table(sfont); if (post) { - /* JK: try to look up Unicode values from the glyph name... */ + /* try to look up Unicode values from the glyph name... */ #define MAX_UNICODES 16 char* name; long unicodes[MAX_UNICODES]; @@ -887,8 +887,11 @@ handle_subst_glyphs (CMap *cmap, unicode_count = agl_get_unicodes(name, unicodes, MAX_UNICODES); } #undef MAX_UNICODES - if (unicode_count == -1 && name) { - MESG("No Unicode mapping available: GID=%u, name=%s\n", gid, name); + if (unicode_count == -1) { + if (name) + MESG("No Unicode mapping available: GID=%u, name=%s\n", gid, name); + else + MESG("No Unicode mapping available: GID=%u\n", gid); } else { /* the Unicode characters go into wbuf[2] and following, in UTF16BE */ /* we rely on WBUF_SIZE being more than adequate for MAX_UNICODES */ -- cgit v1.2.3