diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-09-11 01:34:49 +1000 |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-09-11 01:34:49 +1000 |
commit | 704dd92581783d91ccd234d58896d7078eed14a5 (patch) | |
tree | 29d20b77fb3760cd47e980acc74432624e841be4 /src/gui/text/qtextengine.cpp | |
parent | c21ec3f5a4cce90218a70a1ef657cd38fb20027f (diff) | |
parent | b318fc0800c3081af16a38614b95dd50a82b6bbb (diff) |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging:
Disable autotest broken by the change to QCache in 7ab0bed
Generate glyphs in un-transformed coordinate system.
Use QT_MAX_CACHED_GLYPH_SIZE in QFontEngineFT
Reset trailingSpaces in relayout
Prevent QPixmapCache potentially growing indefinitely.
Allocate 16-byte aligned memory independent of platform for raster pool.
Fix trailing spaces problem by not adding it to QScriptLine.length
Fix RTL layout for fonts when non-printable character has an advance
Fix regression in tst_qrawfont
Make it compile on mac
Fixed compiling error in qvfb.
micro optimizations
fix "comparison between signed and unsigned" warnings
on windows, don't resolve the gdi32's symbols for each QRawFont instance
fix typo in the docs
QRawFont: add missed operator !=
optimize QGlyphRun's operator == a bit
QGlyphRun: make operator != inlined
QGlyphRun: don't detach if the decoration wasn't actually changed
QPA event loop: Set a timeout != 0 if there are no timers.
Diffstat (limited to 'src/gui/text/qtextengine.cpp')
-rw-r--r-- | src/gui/text/qtextengine.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 732b82127d..48860067be 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -968,7 +968,7 @@ void QTextEngine::shapeText(int item) const } for (int i = 0; i < si.num_glyphs; ++i) - si.width += glyphs.advances_x[i]; + si.width += glyphs.advances_x[i] * !glyphs.attributes[i].dontPrint; } static inline bool hasCaseChange(const QScriptItem &si) @@ -2657,7 +2657,7 @@ void QTextEngine::splitItem(int item, int pos) const QFixed w = 0; const QGlyphLayout g = shapedGlyphs(&oldItem); for(int j = 0; j < breakGlyph; ++j) - w += g.advances_x[j]; + w += g.advances_x[j] * !g.attributes[j].dontPrint; newItem.width = oldItem.width - w; oldItem.width = w; @@ -2950,7 +2950,7 @@ int QTextEngine::lineNumberForTextPosition(int pos) return lines.size() - 1; for (int i = 0; i < lines.size(); ++i) { const QScriptLine& line = lines[i]; - if (line.from + line.length > pos) + if (line.from + line.length + line.trailingSpaces > pos) return i; } return -1; |