diff options
author | John Tapsell <john.tapsell.ext@basyskom.de> | 2011-09-08 10:14:33 +0200 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-09-08 10:14:33 +0200 |
commit | 6326227674efa85c1a5320141041110d211efc75 (patch) | |
tree | 75eeda5d1e69cb6c9c612308a31d64ffa221f561 /src/gui/text/qfontengine.cpp | |
parent | 6f59466721d1d11d11da2c46f9e4092f65b14acf (diff) |
Fix RTL layout for fonts when non-printable character has an advance
If a non-printable character has an advance, we would lay out the text
as if the character was part of the output, and then ignore the
character later when the text was rendered. To fix cases such as this,
we take the dontPrint attribute into consideration when adjusting the
advances.
Task-number: QTBUG-21347
Reviewed-by: Eskil
Reviewed-by: Lars
Diffstat (limited to 'src/gui/text/qfontengine.cpp')
-rw-r--r-- | src/gui/text/qfontengine.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index dec09821d3..70568615e9 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -280,6 +280,8 @@ void QFontEngine::getGlyphPositions(const QGlyphLayout &glyphs, const QTransform int i = glyphs.numGlyphs; int totalKashidas = 0; while(i--) { + if (glyphs.attributes[i].dontPrint) + continue; xpos += glyphs.advances_x[i] + QFixed::fromFixed(glyphs.justifications[i].space_18d6); ypos += glyphs.advances_y[i]; totalKashidas += glyphs.justifications[i].nKashidas; |