From f2f265502f3a2d333b3041de30da86f9e4a23e61 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Mon, 2 May 2016 10:49:52 +0200 Subject: Ignore duplicate character in structured text extraction. --- source/fitz/stext-device.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/fitz/stext-device.c') diff --git a/source/fitz/stext-device.c b/source/fitz/stext-device.c index 87ba7cba..f50bbf82 100644 --- a/source/fitz/stext-device.c +++ b/source/fitz/stext-device.c @@ -641,6 +641,11 @@ fz_add_stext_char_imp(fz_context *ctx, fz_stext_device *dev, fz_stext_style *sty } else { + delta.x = q.x - dev->cur_span->max.x; + delta.y = q.y - dev->cur_span->max.y; + if (delta.x < FLT_EPSILON && delta.y < FLT_EPSILON && c == dev->lastchar) + return; + /* Calculate how far we've moved since the end of the current * span. */ delta.x = p.x - dev->cur_span->max.x; -- cgit v1.2.3