summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-03-14 15:23:31 +0100
committerLars Knoll <lars.knoll@qt.io>2020-03-17 01:42:58 +0100
commitdd7d8304bbe599320b163b94e9a4ad9a6f35b740 (patch)
tree9a27d9c39dd72667b402cbb01d9b3f71e6c0e9c6 /src/gui
parent76ced3f179f18f5f28416291140f5804c8a905b9 (diff)
Remove harfbuzz dependency from qunicodetools
Copy the relevant harfbuzz code over from Harfbuzz into qunicodetools.cpp This is basically the attribute functions from the different harfbuzz shapers. Those methods do not require any font support but operate purely on unicode input data. Adjusted the code to use Qt's own data structures and enums (QChar::Script and friends) instead of the harfbuzz equivalents. The code is 100% copyright The Qt Company, so we can do this without requiring any attribution. Change-Id: I8262ba34eae1837f031f07d1b6d9917c0224e160 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Diffstat (limited to 'src/gui')
-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 2deae6f4ba..fce3e519d4 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -1985,7 +1985,7 @@ const QCharAttributes *QTextEngine::attributes() const
for (int i = 0; i < layoutData->items.size(); ++i) {
const QScriptItem &si = layoutData->items.at(i);
scriptItems[i].position = si.position;
- scriptItems[i].script = si.analysis.script;
+ scriptItems[i].script = QChar::Script(si.analysis.script);
}
QUnicodeTools::initCharAttributes(reinterpret_cast<const ushort *>(layoutData->string.constData()),