diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2016-05-02 10:49:52 +0200 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2016-07-07 20:16:11 +0800 |
commit | f2f265502f3a2d333b3041de30da86f9e4a23e61 (patch) | |
tree | c19e528bc9533ba309c2809076d48dbf34b0e8f5 | |
parent | 01d5f0bc4185c001179ca6fd36530516acc16eeb (diff) | |
download | mupdf-f2f265502f3a2d333b3041de30da86f9e4a23e61.tar.xz |
Ignore duplicate character in structured text extraction.
-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 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; |