summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/text/qtextlayout.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index 87f73e1e83..6e824b2ed1 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -2762,6 +2762,7 @@ qreal QTextLine::cursorToX(int *cursorPos, Edge edge) const
glyph_start++;
for (int i = glyph_end - 1; i >= glyph_start; i--)
x += glyphs.effectiveAdvance(i);
+ x -= eng->offsetInLigature(si, pos, end, glyph_pos);
} else {
int start = qMax(line.from - si->position, 0);
int glyph_start = logClusters[start];
@@ -2770,8 +2771,8 @@ qreal QTextLine::cursorToX(int *cursorPos, Edge edge) const
glyph_end--;
for (int i = glyph_start; i <= glyph_end; i++)
x += glyphs.effectiveAdvance(i);
+ x += eng->offsetInLigature(si, pos, end, glyph_pos);
}
- x += eng->offsetInLigature(si, pos, end, glyph_pos);
}
if (eng->option.wrapMode() != QTextOption::NoWrap && x > line.x + line.width)