From 682d4d70a9f8e41cf10b768f1ac86f16d4b14322 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 18 Oct 2010 13:26:10 +0000 Subject: Don't show characters that cannot be encoded by the cmap (this is different from .notdef glyphs). --- mupdf/pdf_build.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mupdf/pdf_build.c b/mupdf/pdf_build.c index 589f638b..43bb7c00 100644 --- a/mupdf/pdf_build.c +++ b/mupdf/pdf_build.c @@ -630,11 +630,10 @@ pdf_showtext(pdf_csi *csi, fz_obj *text) { buf = pdf_decodecmap(fontdesc->encoding, buf, &cpt); cid = pdf_lookupcmap(fontdesc->encoding, cpt); - if (cid == -1) - cid = 0; - - pdf_showglyph(csi, cid); - + if (cid >= 0) + pdf_showglyph(csi, cid); + else + fz_warn("cannot encode character with code point %#x", cpt); if (cpt == 32) pdf_showspace(csi, gstate->wordspace); } -- cgit v1.2.3