[poppler] poppler/TextOutputDev.cc
Carlos Garcia Campos
carlosgc at kemper.freedesktop.org
Sun Jul 21 02:08:54 PDT 2013
poppler/TextOutputDev.cc | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 19930d9f104b63070dcd7636758eb8b90a86fc0d
Author: Ed Catmur <ed at catmur.co.uk>
Date: Sun Jul 21 11:07:00 2013 +0200
TextOutputDev: Do not draw ligatures more than once when selected
When the selection covers a ligature presentation form where a single
character code corresponds to multiple Unicode codepoints, the glyph for
the ligature is drawn multiple times, once for each Unicode character.
https://bugs.freedesktop.org/show_bug.cgi?id=9001
diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc
index 75327b5..7e3f7fd 100644
--- a/poppler/TextOutputDev.cc
+++ b/poppler/TextOutputDev.cc
@@ -4400,6 +4400,9 @@ void TextSelectionPainter::endPage()
out->beginString(state, string);
for (int i = begin; i < fEnd; i++) {
+ if (i != begin && sel->word->charPos[i] == sel->word->charPos[i - 1])
+ continue;
+
out->drawChar(state, sel->word->textMat[i].m[4], sel->word->textMat[i].m[5], 0, 0, 0, 0,
sel->word->charcode[i], 1, NULL, 0);
}
More information about the poppler
mailing list