diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 3842b775f9..c6054d3114 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -1525,10 +1525,10 @@ void QTextEngine::shapeText(int item) const if (QChar::isHighSurrogate(string[i]) && i + 1 < itemLength && QChar::isLowSurrogate(string[i + 1])) { + initialGlyphs.attributes[glyph_pos].dontPrint = !QChar::isPrint(QChar::surrogateToUcs4(string[i], string[i + 1])); ++i; log_clusters[i] = glyph_pos; - initialGlyphs.attributes[glyph_pos].dontPrint = !QChar::isPrint(QChar::surrogateToUcs4(string[i], string[i + 1])); } else { initialGlyphs.attributes[glyph_pos].dontPrint = !QChar::isPrint(string[i]); }