diff options
-rw-r--r-- | mupdf/pdf_build.c | 9 |
1 files 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); } |