diff options
author | David Boddie <david.boddie@nokia.com> | 2010-10-14 17:35:00 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2010-10-14 17:35:00 (GMT) |
commit | 1637d135906296b2a32f17ed20c86869dc1667e8 (patch) | |
tree | 6912905d6d43d9838270a7af77d30d8b54c95b80 /src/gui/text/qtextengine.cpp | |
parent | 17ff53f665ad5de15ce7b073edd1b10b2b397b05 (diff) | |
parent | f103ad276181090da8c70bd29f4474ea7657e03f (diff) | |
download | Qt-1637d135906296b2a32f17ed20c86869dc1667e8.zip Qt-1637d135906296b2a32f17ed20c86869dc1667e8.tar.gz Qt-1637d135906296b2a32f17ed20c86869dc1667e8.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-doc-team into 4.7
Diffstat (limited to 'src/gui/text/qtextengine.cpp')
-rw-r--r-- | src/gui/text/qtextengine.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 05de8f5..3bd6122 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -1949,9 +1949,11 @@ void QTextEngine::justify(const QScriptLine &line) if (kashida_pos >= 0) { // qDebug("kashida position at %d in word", kashida_pos); set(&justificationPoints[nPoints], kashida_type, g.mid(kashida_pos), fontEngine(si)); - minKashida = qMin(minKashida, justificationPoints[nPoints].kashidaWidth); - maxJustify = qMax(maxJustify, justificationPoints[nPoints].type); - ++nPoints; + if (justificationPoints[nPoints].kashidaWidth > 0) { + minKashida = qMin(minKashida, justificationPoints[nPoints].kashidaWidth); + maxJustify = qMax(maxJustify, justificationPoints[nPoints].type); + ++nPoints; + } } kashida_pos = -1; kashida_type = HB_Arabic_Normal; @@ -1975,9 +1977,11 @@ void QTextEngine::justify(const QScriptLine &line) } if (kashida_pos >= 0) { set(&justificationPoints[nPoints], kashida_type, g.mid(kashida_pos), fontEngine(si)); - minKashida = qMin(minKashida, justificationPoints[nPoints].kashidaWidth); - maxJustify = qMax(maxJustify, justificationPoints[nPoints].type); - ++nPoints; + if (justificationPoints[nPoints].kashidaWidth > 0) { + minKashida = qMin(minKashida, justificationPoints[nPoints].kashidaWidth); + maxJustify = qMax(maxJustify, justificationPoints[nPoints].type); + ++nPoints; + } } } |