diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-03-25 05:55:45 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-03-25 05:55:45 (GMT) |
commit | f5c194ca63bb8992f2b74c232408de8ed467950e (patch) | |
tree | dbf0a2d92f4ee7fa1014b0a435081e871259027c /src/gui/text | |
parent | 660f881f04a0880c83a0b43b4f4d0e89da082d92 (diff) | |
parent | f49490a13b664eb00207b2d3d6354071ae81f161 (diff) | |
download | Qt-f5c194ca63bb8992f2b74c232408de8ed467950e.zip Qt-f5c194ca63bb8992f2b74c232408de8ed467950e.tar.gz Qt-f5c194ca63bb8992f2b74c232408de8ed467950e.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:
Make sure num_glyphs pass to HarfBuzz is large enough
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qtextengine.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index b511b5a..4378c62 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -1233,6 +1233,8 @@ void QTextEngine::shapeTextWithHarfbuzz(int item) const shaper_item.num_glyphs -= itemBoundaries[k + 1]; } shaper_item.initialGlyphCount = shaper_item.num_glyphs; + if (shaper_item.num_glyphs < shaper_item.item.length) + shaper_item.num_glyphs = shaper_item.item.length; QFontEngine *actualFontEngine = font; uint engineIdx = 0; @@ -1257,7 +1259,8 @@ void QTextEngine::shapeTextWithHarfbuzz(int item) const } const QGlyphLayout g = availableGlyphs(&si).mid(glyph_pos); - moveGlyphData(g.mid(shaper_item.num_glyphs), g.mid(shaper_item.initialGlyphCount), remaining_glyphs); + if (shaper_item.num_glyphs > shaper_item.item.length) + moveGlyphData(g.mid(shaper_item.num_glyphs), g.mid(shaper_item.initialGlyphCount), remaining_glyphs); shaper_item.glyphs = g.glyphs; shaper_item.attributes = g.attributes; |