From 25837ec93522939d12e7ce0efd94bfa1435e6775 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 24 Oct 2016 17:29:37 +0200 Subject: 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. --- source/fitz/stext-device.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source') 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 || -- cgit v1.2.3