diff options
author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2024-01-22 22:31:51 +0200 |
---|---|---|
committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2024-01-22 22:31:51 +0200 |
commit | 67934c103800bae50c2ec1977758d40fa8e4e507 (patch) | |
tree | 77a44eb54a75a35bd10f3c63be588889b697e451 /src/gui/text/qtextlayout.cpp | |
parent | 694575a59b5370afc494fbf700eee8db1d1ec091 (diff) | |
parent | ca128e25119c0b259d083567c796bfa67b100a42 (diff) |
Merge remote-tracking branch 'origin/tqtc/lts-6.2.8' into tqtc/lts-6.2-opensource
Conflicts solved in a file:
src/corelib/io/qstandardpaths_android.cpp
Change-Id: Ie8cef36c1379679ca358df50c56b3c25aa15c5d6
Diffstat (limited to 'src/gui/text/qtextlayout.cpp')
-rw-r--r-- | src/gui/text/qtextlayout.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index b8d21c9a8e..2dd2c58630 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -2396,14 +2396,18 @@ QList<QGlyphRun> QTextLine::glyphRuns(int from, int length) const // when we're breaking a RTL script item, since the expected position passed into // getGlyphPositions() is the left-most edge of the left-most glyph in an RTL run. if (relativeFrom != (iterator.itemStart - si.position) && !rtl) { - for (int i=itemGlyphsStart; i<glyphsStart; ++i) { - QFixed justification = QFixed::fromFixed(glyphLayout.justifications[i].space_18d6); - pos.rx() += (glyphLayout.advances[i] + justification).toReal(); + for (int i = itemGlyphsStart; i < glyphsStart; ++i) { + if (!glyphLayout.attributes[i].dontPrint) { + QFixed justification = QFixed::fromFixed(glyphLayout.justifications[i].space_18d6); + pos.rx() += (glyphLayout.advances[i] + justification).toReal(); + } } } else if (relativeTo != (iterator.itemEnd - si.position - 1) && rtl) { - for (int i=itemGlyphsEnd; i>glyphsEnd; --i) { - QFixed justification = QFixed::fromFixed(glyphLayout.justifications[i].space_18d6); - pos.rx() += (glyphLayout.advances[i] + justification).toReal(); + for (int i = itemGlyphsEnd; i > glyphsEnd; --i) { + if (!glyphLayout.attributes[i].dontPrint) { + QFixed justification = QFixed::fromFixed(glyphLayout.justifications[i].space_18d6); + pos.rx() += (glyphLayout.advances[i] + justification).toReal(); + } } } @@ -2452,8 +2456,10 @@ QList<QGlyphRun> QTextLine::glyphRuns(int from, int length) const relativeFrom + si.position, relativeTo - relativeFrom + 1)); for (int i = 0; i < subLayout.numGlyphs; ++i) { - QFixed justification = QFixed::fromFixed(subLayout.justifications[i].space_18d6); - pos.rx() += (subLayout.advances[i] + justification).toReal(); + if (!subLayout.attributes[i].dontPrint) { + QFixed justification = QFixed::fromFixed(subLayout.justifications[i].space_18d6); + pos.rx() += (subLayout.advances[i] + justification).toReal(); + } } if (rtl) |