diff options
Diffstat (limited to 'src/gui/text/qtextlayout.cpp')
-rw-r--r-- | src/gui/text/qtextlayout.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index 5afe18751f..cd1990dfb9 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -2758,6 +2758,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]; @@ -2766,8 +2767,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) |