Fix justification in multi fontengine glyphruns

QTextLine::glyphRuns was not handling justification when splitting
glyphRuns due to multiple font-engines. This patch adds the missing
justification.

Task-number: QTBUG-41901
Change-Id: I02d24218630506da21531a6499784dff2eecdf6f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
bb10
Allan Sandfeld Jensen 2014-10-28 12:36:45 +01:00 committed by Allan Sandfeld Jensen
parent b1d3f1fec0
commit 23553cccda
1 changed files with 4 additions and 2 deletions

View File

@ -2256,8 +2256,10 @@ QList<QGlyphRun> QTextLine::glyphRuns(int from, int length) const
logClusters,
iterator.itemStart,
iterator.itemLength));
for (int i = 0; i < subLayout.numGlyphs; ++i)
pos.rx() += subLayout.advances[i].toReal();
for (int i = 0; i < subLayout.numGlyphs; ++i) {
QFixed justification = QFixed::fromFixed(subLayout.justifications[i].space_18d6);
pos.rx() += (subLayout.advances[i] + justification).toReal();
}
if (rtl)
end = start;