summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/unicode/main.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/util/unicode/main.cpp b/util/unicode/main.cpp
index f2ebe7c..5303c0d 100644
--- a/util/unicode/main.cpp
+++ b/util/unicode/main.cpp
@@ -1908,6 +1908,19 @@ QByteArray createScriptTableDeclaration()
}
declaration += "\n};\n\n} // namespace QUnicodeTables\n\n";
+ declaration +=
+ "Q_CORE_EXPORT int QT_FASTCALL QUnicodeTables::script(uint ucs4)\n"
+ "{\n"
+ " if (ucs4 > 0xffff)\n"
+ " return Common;\n"
+ " int script = uc_scripts[ucs4 >> 7];\n"
+ " if (script < ScriptSentinel)\n"
+ " return script;\n"
+ " script = (((script - ScriptSentinel) * UnicodeBlockSize) + UnicodeBlockCount);\n"
+ " script = uc_scripts[script + (ucs4 & 0x7f)];\n"
+ " return script;\n"
+ "}\n\n";
+
qDebug("createScriptTableDeclaration: table size is %d bytes",
unicodeBlockCount + (extraBlockList.size() * unicodeBlockSize));
@@ -2168,6 +2181,11 @@ static QByteArray createPropertyInfo()
" return uc_properties + index;\n"
"}\n\n";
+ out += "Q_CORE_EXPORT QUnicodeTables::LineBreakClass QT_FASTCALL QUnicodeTables::lineBreakClass(uint ucs4)\n"
+ "{\n"
+ " return (QUnicodeTables::LineBreakClass)qGetProp(ucs4)->line_break_class;\n"
+ "}\n\n";
+
out += "static const ushort specialCaseMap[] = {\n ";
for (int i = 0; i < specialCaseMap.size(); ++i) {
out += QByteArray(" 0x") + QByteArray::number(specialCaseMap.at(i), 16);