diff options
author | Jüri Valdmann <juri.valdmann@qt.io> | 2019-05-06 11:59:31 +0200 |
---|---|---|
committer | Jüri Valdmann <juri.valdmann@qt.io> | 2019-05-07 07:50:33 +0000 |
commit | b5154b5254950427383c96a382457fa0bb87e69e (patch) | |
tree | 86cb4340c5e9ccb9c9fd44fe1f628c581eb1cfc9 /src/gui | |
parent | 6afdbfdaafcc4d24e08357dfea96b85787efb1f7 (diff) |
Fix QTextEngine::shapeText casing of surrogate pairs
The high part was not copied to output.
Fixes: QTBUG-75559
Change-Id: I9350e52d256510f52b3fcc0015bf879d2c609532
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/text/qtextengine.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 22c93d7ec2..2da13289bf 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -1383,11 +1383,12 @@ void QTextEngine::shapeText(int item) const if (QChar::isHighSurrogate(ucs4) && i + 1 < itemLength) { uint low = string[i + 1]; if (QChar::isLowSurrogate(low)) { + // high part never changes in simple casing + uc[i] = ucs4; ++i; ucs4 = QChar::surrogateToUcs4(ucs4, low); ucs4 = si.analysis.flags == QScriptAnalysis::Lowercase ? QChar::toLower(ucs4) : QChar::toUpper(ucs4); - // high part never changes in simple casing uc[i] = QChar::lowSurrogate(ucs4); } } else { |