diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-10-24 17:29:37 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-10-24 17:51:45 +0200 |
commit | 25837ec93522939d12e7ce0efd94bfa1435e6775 (patch) | |
tree | 834f828dd159384b236b1d89125e1b87f28dd4ad | |
parent | d81f9236296fe1f456002ec4eb644c4405f3b006 (diff) | |
download | mupdf-25837ec93522939d12e7ce0efd94bfa1435e6775.tar.xz |
Fix 697236: Don't update pen position inside clusters in stext device.
This caused us to introduce extra space characters after clusters that
come from ligatures such as 'fi' which are composed of two characters
but only one glyph.
-rw-r--r-- | source/fitz/stext-device.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/fitz/stext-device.c b/source/fitz/stext-device.c index d71bce65..ff26acdb 100644 --- a/source/fitz/stext-device.c +++ b/source/fitz/stext-device.c @@ -626,7 +626,12 @@ fz_add_stext_char_imp(fz_context *ctx, fz_stext_device *dev, fz_stext_style *sty } if (glyph < 0) + { + /* Don't reset 'pen' to start of no-glyph characters in cluster */ + if (dev->cur_span) + q = dev->cur_span->max; goto no_glyph; + } if (dev->cur_span == NULL || trm->a != dev->cur_span->transform.a || trm->b != dev->cur_span->transform.b || |