[gs-commits] mupdf/master - 0_7-22-g2497104 - Don't show characters that cannot be encoded by the cmap (this is different from .notdef glyphs).
Tor Andersson
tor at ghostscript.com
Thu Oct 21 00:03:19 UTC 2010
commit 2497104f54030bb294ec0e3e8cb5e24097001262
Author: Tor Andersson <tor at ghostscript.com>
Date: Mon Oct 18 13:26:10 2010 +0000
Don't show characters that cannot be encoded by the cmap (this is different from .notdef glyphs).
Ignore-this: a8e32b22a2792b62bc02734e4b88df07
darcs-hash:20101018132610-f546f-9d85273f015edaa096461e06f33f3382f0410bee.gz
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/mupdf/pdf_build.c b/mupdf/pdf_build.c
index 589f638..43bb7c0 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);
}
--
git/hooks/post-receive
More information about the gs-commits
mailing list