summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-10-24 17:29:37 +0200
committerTor Andersson <tor.andersson@artifex.com>2016-10-24 17:51:45 +0200
commit25837ec93522939d12e7ce0efd94bfa1435e6775 (patch)
tree834f828dd159384b236b1d89125e1b87f28dd4ad /source
parentd81f9236296fe1f456002ec4eb644c4405f3b006 (diff)
downloadmupdf-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.
Diffstat (limited to 'source')
-rw-r--r--source/fitz/stext-device.c5
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 ||