diff options
Diffstat (limited to 'pdf/pdf_interpret.c')
-rw-r--r-- | pdf/pdf_interpret.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pdf/pdf_interpret.c b/pdf/pdf_interpret.c index 3b774d71..63f208a1 100644 --- a/pdf/pdf_interpret.c +++ b/pdf/pdf_interpret.c @@ -816,13 +816,14 @@ pdf_show_string(pdf_csi *csi, unsigned char *buf, int len) while (buf < end) { - buf = pdf_decode_cmap(fontdesc->encoding, buf, &cpt); + int w; + buf = pdf_decode_cmap(fontdesc->encoding, buf, &cpt, &w); cid = pdf_lookup_cmap(fontdesc->encoding, cpt); if (cid >= 0) pdf_show_char(csi, cid); else fz_warn(ctx, "cannot encode character with code point %#x", cpt); - if (cpt == 32) + if (cpt == 32 && w == 1) pdf_show_space(csi, gstate->word_space); } } |