diff options
Diffstat (limited to 'src/gui')
-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 752c6180f8..486e04544a 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -2492,14 +2492,18 @@ QList<QGlyphRun> QTextLine::glyphRuns(int from, // 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(); + } } } @@ -2554,8 +2558,10 @@ QList<QGlyphRun> QTextLine::glyphRuns(int from, glyphRuns.append(glyphRun); } 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) |