diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-04-26 17:48:55 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-04-26 17:48:55 (GMT) |
commit | 7783b04aad1d90e84e6e66a6c99f6eeca97b1342 (patch) | |
tree | 72d0728d19a9c96254fa5cf8a9581d9990c4c516 /src/gui/text/qtextengine.cpp | |
parent | b47fcc45fc3d4fc9b23aedeb2d5ef46d7e28628e (diff) | |
parent | e945c5009881eac49fd9b54966643a7e9d24c433 (diff) | |
download | Qt-7783b04aad1d90e84e6e66a6c99f6eeca97b1342.zip Qt-7783b04aad1d90e84e6e66a6c99f6eeca97b1342.tar.gz Qt-7783b04aad1d90e84e6e66a6c99f6eeca97b1342.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Add new exported symbol to QtGuiu.def
Handle uppercase 'E' when parsing numbers in SVGs.
Let QTextLine decide its own x position in QPainter
Support text decoration in QML when using static text back-end
Fix missing color in text when using static text back-end in QML
Diffstat (limited to 'src/gui/text/qtextengine.cpp')
-rw-r--r-- | src/gui/text/qtextengine.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 4378c62..4f86cff 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -2681,6 +2681,22 @@ void QTextEngine::resolveAdditionalFormats() const specialData->resolvedFormatIndices = indices; } +QFixed QTextEngine::leadingSpaceWidth(const QScriptLine &line) +{ + if (!line.hasTrailingSpaces + || (option.flags() & QTextOption::IncludeTrailingSpaces) + || !isRightToLeft()) + return QFixed(); + + int pos = line.length; + const HB_CharAttributes *attributes = this->attributes(); + if (!attributes) + return QFixed(); + while (pos > 0 && attributes[line.from + pos - 1].whiteSpace) + --pos; + return width(line.from + pos, line.length - pos); +} + QStackTextEngine::QStackTextEngine(const QString &string, const QFont &f) : QTextEngine(string, f), _layoutData(string, _memory, MemSize) |