summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>2014-01-03 12:27:02 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-03 13:00:18 +0100
commit753b472cb851bf12033b1e3ae663b4bdd056d1ef (patch)
tree1267a8c74a8456e8112439504d40d7ace669b5a8 /src
parent286c41c32f26691056ccac6e9276921e1bf930da (diff)
REG: Fix support for strings spanning multiple font engines
E.g. in the case where the first char in a font got a font engine index != 0, and the second character got font engine index == 0, we would not count the second character as a separate glyph run. The result would be that its glyph indexes would refer to font #0, but the font used to render them would be the same as for the first character, i.e. random. Task-number: QTBUG-35740 [ChangeLog][Text][QTBUG-35740] Fixed regression when shaping some strings containing characters from multiple fonts. Change-Id: I668804045c8b276787c7b256bc87916c467f3f59 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/text/qtextengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index 4e1c8c4c4a..06c5e24920 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -954,12 +954,12 @@ void QTextEngine::shapeText(int item) const
itemBoundaries.append(i);
itemBoundaries.append(glyph_pos);
- lastEngine = engineIdx;
QFontEngine *actualFontEngine = static_cast<QFontEngineMulti *>(fontEngine)->engine(engineIdx);
si.ascent = qMax(actualFontEngine->ascent(), si.ascent);
si.descent = qMax(actualFontEngine->descent(), si.descent);
si.leading = qMax(actualFontEngine->leading(), si.leading);
}
+ lastEngine = engineIdx;
if (QChar::isHighSurrogate(string[i]) && i + 1 < itemLength && QChar::isLowSurrogate(string[i + 1]))
++i;
}