Update Unicode data up to v7.0
* Two newly adopted currency symbols: the Azerbaijan manat and the Russia ruble * Pictographic symbols (including many emoji), geometric symbols, arrows, and ornaments originating from the Wingdings and Webdings sets * Twenty-three new lesser-used and historic scripts extending support for written languages of North America, China, India, other Asian countries, and Africa * Letters used in Teuthonista and other transcriptional systems, and a new notational set, Duployan For more details, see http://www.unicode.org/versions/Unicode7.0.0/ The Properties struct's .*Diff members were narrowed down to signed 15 bits and the unicodeVersion has been expanded to 8 bits. [ChangeLog][QtCore] Unicode data updated to v.7.0 Change-Id: I93ab6f79fa3b05f61abc7279f1d046834c1c1a0b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This commit is contained in:
parent
ecdd5648bd
commit
dec451cf67
@ -377,6 +377,29 @@ QT_BEGIN_NAMESPACE
|
||||
\value Script_Sharada
|
||||
\value Script_SoraSompeng
|
||||
\value Script_Takri
|
||||
\value Script_CaucasianAlbanian
|
||||
\value Script_BassaVah
|
||||
\value Script_Duployan
|
||||
\value Script_Elbasan
|
||||
\value Script_Grantha
|
||||
\value Script_PahawhHmong
|
||||
\value Script_Khojki
|
||||
\value Script_LinearA
|
||||
\value Script_Mahajani
|
||||
\value Script_Manichaean
|
||||
\value Script_MendeKikakui
|
||||
\value Script_Modi
|
||||
\value Script_Mro
|
||||
\value Script_OldNorthArabian
|
||||
\value Script_Nabataean
|
||||
\value Script_Palmyrene
|
||||
\value Script_PauCinHau
|
||||
\value Script_OldPermic
|
||||
\value Script_PsalterPahlavi
|
||||
\value Script_Siddham
|
||||
\value Script_Khudawadi
|
||||
\value Script_Tirhuta
|
||||
\value Script_WarangCiti
|
||||
|
||||
\omitvalue ScriptCount
|
||||
|
||||
|
@ -250,6 +250,31 @@ public:
|
||||
Script_SoraSompeng,
|
||||
Script_Takri,
|
||||
|
||||
// Unicode 7.0 additions
|
||||
Script_CaucasianAlbanian,
|
||||
Script_BassaVah,
|
||||
Script_Duployan,
|
||||
Script_Elbasan,
|
||||
Script_Grantha,
|
||||
Script_PahawhHmong,
|
||||
Script_Khojki,
|
||||
Script_LinearA,
|
||||
Script_Mahajani,
|
||||
Script_Manichaean,
|
||||
Script_MendeKikakui,
|
||||
Script_Modi,
|
||||
Script_Mro,
|
||||
Script_OldNorthArabian,
|
||||
Script_Nabataean,
|
||||
Script_Palmyrene,
|
||||
Script_PauCinHau,
|
||||
Script_OldPermic,
|
||||
Script_PsalterPahlavi,
|
||||
Script_Siddham,
|
||||
Script_Khudawadi,
|
||||
Script_Tirhuta,
|
||||
Script_WarangCiti,
|
||||
|
||||
ScriptCount
|
||||
};
|
||||
|
||||
@ -339,7 +364,8 @@ public:
|
||||
Unicode_6_0,
|
||||
Unicode_6_1,
|
||||
Unicode_6_2,
|
||||
Unicode_6_3
|
||||
Unicode_6_3,
|
||||
Unicode_7_0
|
||||
};
|
||||
// ****** WHEN ADDING FUNCTIONS, CONSIDER ADDING TO QCharRef TOO
|
||||
|
||||
|
@ -49,7 +49,7 @@ namespace QUnicodeTools {
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
//
|
||||
// The text boundaries determination algorithm.
|
||||
// See http://www.unicode.org/reports/tr29/tr29-23.html
|
||||
// See http://www.unicode.org/reports/tr29/tr29-25.html
|
||||
//
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
|
||||
@ -341,7 +341,7 @@ static void getSentenceBreaks(const ushort *string, quint32 len, QCharAttributes
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
//
|
||||
// The line breaking algorithm.
|
||||
// See http://www.unicode.org/reports/tr14/tr14-32.html
|
||||
// See http://www.unicode.org/reports/tr14/tr14-33.html
|
||||
//
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
|
||||
@ -659,7 +659,7 @@ Q_CORE_EXPORT void initCharAttributes(const ushort *string, int length,
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// The Unicode script property. See http://www.unicode.org/reports/tr24/tr24-21.html
|
||||
// The Unicode script property. See http://www.unicode.org/reports/tr24/tr24-22.html
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
|
@ -94,6 +94,8 @@ static const hb_script_t _qtscript_to_hbscript[] = {
|
||||
HB_SCRIPT_BUHID,
|
||||
HB_SCRIPT_TAGBANWA,
|
||||
HB_SCRIPT_COPTIC,
|
||||
|
||||
// Unicode 4.0 additions
|
||||
HB_SCRIPT_LIMBU,
|
||||
HB_SCRIPT_TAI_LE,
|
||||
HB_SCRIPT_LINEAR_B,
|
||||
@ -102,6 +104,8 @@ static const hb_script_t _qtscript_to_hbscript[] = {
|
||||
HB_SCRIPT_OSMANYA,
|
||||
HB_SCRIPT_CYPRIOT,
|
||||
HB_SCRIPT_BRAILLE,
|
||||
|
||||
// Unicode 4.1 additions
|
||||
HB_SCRIPT_BUGINESE,
|
||||
HB_SCRIPT_NEW_TAI_LUE,
|
||||
HB_SCRIPT_GLAGOLITIC,
|
||||
@ -109,11 +113,15 @@ static const hb_script_t _qtscript_to_hbscript[] = {
|
||||
HB_SCRIPT_SYLOTI_NAGRI,
|
||||
HB_SCRIPT_OLD_PERSIAN,
|
||||
HB_SCRIPT_KHAROSHTHI,
|
||||
|
||||
// Unicode 5.0 additions
|
||||
HB_SCRIPT_BALINESE,
|
||||
HB_SCRIPT_CUNEIFORM,
|
||||
HB_SCRIPT_PHOENICIAN,
|
||||
HB_SCRIPT_PHAGS_PA,
|
||||
HB_SCRIPT_NKO,
|
||||
|
||||
// Unicode 5.1 additions
|
||||
HB_SCRIPT_SUNDANESE,
|
||||
HB_SCRIPT_LEPCHA,
|
||||
HB_SCRIPT_OL_CHIKI,
|
||||
@ -125,6 +133,8 @@ static const hb_script_t _qtscript_to_hbscript[] = {
|
||||
HB_SCRIPT_CARIAN,
|
||||
HB_SCRIPT_LYDIAN,
|
||||
HB_SCRIPT_CHAM,
|
||||
|
||||
// Unicode 5.2 additions
|
||||
HB_SCRIPT_TAI_THAM,
|
||||
HB_SCRIPT_TAI_VIET,
|
||||
HB_SCRIPT_AVESTAN,
|
||||
@ -140,16 +150,45 @@ static const hb_script_t _qtscript_to_hbscript[] = {
|
||||
HB_SCRIPT_INSCRIPTIONAL_PAHLAVI,
|
||||
HB_SCRIPT_OLD_TURKIC,
|
||||
HB_SCRIPT_KAITHI,
|
||||
|
||||
// Unicode 6.0 additions
|
||||
HB_SCRIPT_BATAK,
|
||||
HB_SCRIPT_BRAHMI,
|
||||
HB_SCRIPT_MANDAIC,
|
||||
|
||||
// Unicode 6.1 additions
|
||||
HB_SCRIPT_CHAKMA,
|
||||
HB_SCRIPT_MEROITIC_CURSIVE,
|
||||
HB_SCRIPT_MEROITIC_HIEROGLYPHS,
|
||||
HB_SCRIPT_MIAO,
|
||||
HB_SCRIPT_SHARADA,
|
||||
HB_SCRIPT_SORA_SOMPENG,
|
||||
HB_SCRIPT_TAKRI
|
||||
HB_SCRIPT_TAKRI,
|
||||
|
||||
// Unicode 7.0 additions
|
||||
HB_SCRIPT_CAUCASIAN_ALBANIAN,
|
||||
HB_SCRIPT_BASSA_VAH,
|
||||
HB_SCRIPT_DUPLOYAN,
|
||||
HB_SCRIPT_ELBASAN,
|
||||
HB_SCRIPT_GRANTHA,
|
||||
HB_SCRIPT_PAHAWH_HMONG,
|
||||
HB_SCRIPT_KHOJKI,
|
||||
HB_SCRIPT_LINEAR_A,
|
||||
HB_SCRIPT_MAHAJANI,
|
||||
HB_SCRIPT_MANICHAEAN,
|
||||
HB_SCRIPT_MENDE_KIKAKUI,
|
||||
HB_SCRIPT_MODI,
|
||||
HB_SCRIPT_MRO,
|
||||
HB_SCRIPT_OLD_NORTH_ARABIAN,
|
||||
HB_SCRIPT_NABATAEAN,
|
||||
HB_SCRIPT_PALMYRENE,
|
||||
HB_SCRIPT_PAU_CIN_HAU,
|
||||
HB_SCRIPT_OLD_PERMIC,
|
||||
HB_SCRIPT_PSALTER_PAHLAVI,
|
||||
HB_SCRIPT_SIDDHAM,
|
||||
HB_SCRIPT_KHUDAWADI,
|
||||
HB_SCRIPT_TIRHUTA,
|
||||
HB_SCRIPT_WARANG_CITI
|
||||
};
|
||||
Q_STATIC_ASSERT(QChar::ScriptCount == sizeof(_qtscript_to_hbscript) / sizeof(_qtscript_to_hbscript[0]));
|
||||
|
||||
|
@ -881,16 +881,22 @@ static inline void qt_getJustificationOpportunities(const ushort *string, int le
|
||||
int spaceAs;
|
||||
|
||||
switch (si.analysis.script) {
|
||||
case QChar::Script_Arabic:
|
||||
case QChar::Script_Syriac:
|
||||
case QChar::Script_Nko:
|
||||
case QChar::Script_Mandaic:
|
||||
case QChar::Script_Mongolian:
|
||||
case QChar::Script_PhagsPa:
|
||||
case QChar::Script_Manichaean:
|
||||
case QChar::Script_PsalterPahlavi:
|
||||
// same as default but inter character justification takes precedence
|
||||
spaceAs = Justification_Arabic_Space;
|
||||
break;
|
||||
|
||||
case QChar::Script_Tibetan:
|
||||
case QChar::Script_Hiragana:
|
||||
case QChar::Script_Katakana:
|
||||
case QChar::Script_Bopomofo:
|
||||
case QChar::Script_Han:
|
||||
// same as default but inter character justification is the only option
|
||||
spaceAs = Justification_Character;
|
||||
@ -1630,10 +1636,10 @@ void QTextEngine::itemize() const
|
||||
for (int i = 0; i < length; ++i) {
|
||||
switch (analysis[i].script) {
|
||||
case QChar::Script_Latin:
|
||||
case QChar::Script_Han:
|
||||
case QChar::Script_Hiragana:
|
||||
case QChar::Script_Katakana:
|
||||
case QChar::Script_Bopomofo:
|
||||
case QChar::Script_Han:
|
||||
analysis[i].script = QChar::Script_Common;
|
||||
break;
|
||||
default:
|
||||
|
@ -218,7 +218,30 @@ static const char *specialLanguages[] = {
|
||||
"hmd", // Miao
|
||||
"sa", // Sharada
|
||||
"srb", // SoraSompeng
|
||||
"doi" // Takri
|
||||
"doi", // Takri
|
||||
"lez", // CaucasianAlbanian
|
||||
"bsq", // BassaVah
|
||||
"fr", // Duployan
|
||||
"sq", // Elbasan
|
||||
"sa", // Grantha
|
||||
"hnj", // PahawhHmong
|
||||
"sd", // Khojki
|
||||
"lab", // LinearA
|
||||
"hi", // Mahajani
|
||||
"xmn", // Manichaean
|
||||
"men", // MendeKikakui
|
||||
"mr", // Modi
|
||||
"mru", // Mro
|
||||
"xna", // OldNorthArabian
|
||||
"arc", // Nabataean
|
||||
"arc", // Palmyrene
|
||||
"ctd", // PauCinHau
|
||||
"kv", // OldPermic
|
||||
"pal", // PsalterPahlavi
|
||||
"sa", // Siddham
|
||||
"sd", // Khudawadi
|
||||
"mai", // Tirhuta
|
||||
"hoc" // WarangCiti
|
||||
};
|
||||
Q_STATIC_ASSERT(sizeof(specialLanguages) / sizeof(const char *) == QChar::ScriptCount);
|
||||
|
||||
|
@ -135,6 +135,8 @@ void tst_QChar::toUpper()
|
||||
QVERIFY(QChar(0x1c7).toUpper().unicode() == 0x1c7);
|
||||
QVERIFY(QChar(0x1c8).toUpper().unicode() == 0x1c7);
|
||||
QVERIFY(QChar(0x1c9).toUpper().unicode() == 0x1c7);
|
||||
QVERIFY(QChar(0x25c).toUpper().unicode() == 0xa7ab);
|
||||
QVERIFY(QChar(0x29e).toUpper().unicode() == 0xa7b0);
|
||||
QVERIFY(QChar(0x1d79).toUpper().unicode() == 0xa77d);
|
||||
QVERIFY(QChar(0x0265).toUpper().unicode() == 0xa78d);
|
||||
|
||||
@ -144,6 +146,8 @@ void tst_QChar::toUpper()
|
||||
QVERIFY(QChar::toUpper(0x1c7) == 0x1c7);
|
||||
QVERIFY(QChar::toUpper(0x1c8) == 0x1c7);
|
||||
QVERIFY(QChar::toUpper(0x1c9) == 0x1c7);
|
||||
QVERIFY(QChar::toUpper(0x25c) == 0xa7ab);
|
||||
QVERIFY(QChar::toUpper(0x29e) == 0xa7b0);
|
||||
QVERIFY(QChar::toUpper(0x1d79) == 0xa77d);
|
||||
QVERIFY(QChar::toUpper(0x0265) == 0xa78d);
|
||||
|
||||
@ -160,6 +164,8 @@ void tst_QChar::toLower()
|
||||
QVERIFY(QChar(0x1c9).toLower().unicode() == 0x1c9);
|
||||
QVERIFY(QChar(0xa77d).toLower().unicode() == 0x1d79);
|
||||
QVERIFY(QChar(0xa78d).toLower().unicode() == 0x0265);
|
||||
QVERIFY(QChar(0xa7ab).toLower().unicode() == 0x25c);
|
||||
QVERIFY(QChar(0xa7b1).toLower().unicode() == 0x287);
|
||||
|
||||
QVERIFY(QChar::toLower('a') == 'a');
|
||||
QVERIFY(QChar::toLower('A') == 'a');
|
||||
@ -168,6 +174,8 @@ void tst_QChar::toLower()
|
||||
QVERIFY(QChar::toLower(0x1c9) == 0x1c9);
|
||||
QVERIFY(QChar::toLower(0xa77d) == 0x1d79);
|
||||
QVERIFY(QChar::toLower(0xa78d) == 0x0265);
|
||||
QVERIFY(QChar::toLower(0xa7ab) == 0x25c);
|
||||
QVERIFY(QChar::toLower(0xa7b1) == 0x287);
|
||||
|
||||
QVERIFY(QChar::toLower(0x10400) == 0x10428);
|
||||
QVERIFY(QChar::toLower(0x10428) == 0x10428);
|
||||
@ -205,6 +213,8 @@ void tst_QChar::toCaseFolded()
|
||||
QVERIFY(QChar(0x1c9).toCaseFolded().unicode() == 0x1c9);
|
||||
QVERIFY(QChar(0xa77d).toCaseFolded().unicode() == 0x1d79);
|
||||
QVERIFY(QChar(0xa78d).toCaseFolded().unicode() == 0x0265);
|
||||
QVERIFY(QChar(0xa7ab).toCaseFolded().unicode() == 0x25c);
|
||||
QVERIFY(QChar(0xa7b1).toCaseFolded().unicode() == 0x287);
|
||||
|
||||
QVERIFY(QChar::toCaseFolded('a') == 'a');
|
||||
QVERIFY(QChar::toCaseFolded('A') == 'a');
|
||||
@ -213,6 +223,8 @@ void tst_QChar::toCaseFolded()
|
||||
QVERIFY(QChar::toCaseFolded(0x1c9) == 0x1c9);
|
||||
QVERIFY(QChar::toCaseFolded(0xa77d) == 0x1d79);
|
||||
QVERIFY(QChar::toCaseFolded(0xa78d) == 0x0265);
|
||||
QVERIFY(QChar::toCaseFolded(0xa7ab) == 0x25c);
|
||||
QVERIFY(QChar::toCaseFolded(0xa7b1) == 0x287);
|
||||
|
||||
QVERIFY(QChar::toCaseFolded(0x10400) == 0x10428);
|
||||
QVERIFY(QChar::toCaseFolded(0x10428) == 0x10428);
|
||||
@ -341,6 +353,7 @@ void tst_QChar::isPrint()
|
||||
QVERIFY(QChar(0x1e9e).isPrint()); // assigned in 5.1
|
||||
QVERIFY(QChar::isPrint(0x1b000)); // assigned in 6.0
|
||||
QVERIFY(QChar::isPrint(0x110d0)); // assigned in 5.1
|
||||
QVERIFY(!QChar::isPrint(0x1bca0)); // assigned in 7.0
|
||||
}
|
||||
|
||||
void tst_QChar::isUpper()
|
||||
@ -471,6 +484,7 @@ void tst_QChar::joiningType()
|
||||
QVERIFY(QChar(0x0627).joiningType() == QChar::Joining_Right);
|
||||
QVERIFY(QChar(0x05d0).joiningType() == QChar::Joining_None);
|
||||
QVERIFY(QChar(0x00ad).joiningType() == QChar::Joining_Transparent);
|
||||
QVERIFY(QChar(0xA872).joiningType() == QChar::Joining_Left);
|
||||
|
||||
QVERIFY(QChar::joiningType('a') == QChar::Joining_None);
|
||||
QVERIFY(QChar::joiningType('0') == QChar::Joining_None);
|
||||
@ -484,6 +498,8 @@ void tst_QChar::joiningType()
|
||||
QVERIFY(QChar::joiningType(0x2FA17) == QChar::Joining_None);
|
||||
|
||||
QVERIFY(QChar::joiningType(0xA872) == QChar::Joining_Left);
|
||||
QVERIFY(QChar::joiningType(0x10ACD) == QChar::Joining_Left);
|
||||
QVERIFY(QChar::joiningType(0x10AD7) == QChar::Joining_Left);
|
||||
}
|
||||
|
||||
void tst_QChar::combiningClass()
|
||||
@ -574,6 +590,10 @@ void tst_QChar::unicodeVersion()
|
||||
QVERIFY(QChar(0x061c).unicodeVersion() == QChar::Unicode_6_3);
|
||||
QVERIFY(QChar::unicodeVersion(0x061c) == QChar::Unicode_6_3);
|
||||
|
||||
QVERIFY(QChar(0x20bd).unicodeVersion() == QChar::Unicode_7_0);
|
||||
QVERIFY(QChar::unicodeVersion(0x20bd) == QChar::Unicode_7_0);
|
||||
QVERIFY(QChar::unicodeVersion(0x16b00) == QChar::Unicode_7_0);
|
||||
|
||||
QVERIFY(QChar(0x09ff).unicodeVersion() == QChar::Unicode_Unassigned);
|
||||
QVERIFY(QChar::unicodeVersion(0x09ff) == QChar::Unicode_Unassigned);
|
||||
QVERIFY(QChar::unicodeVersion(0x110000) == QChar::Unicode_Unassigned);
|
||||
|
@ -43,8 +43,8 @@
|
||||
#include <private/qunicodetables_p.h>
|
||||
#endif
|
||||
|
||||
#define DATA_VERSION_S "6.3"
|
||||
#define DATA_VERSION_STR "QChar::Unicode_6_3"
|
||||
#define DATA_VERSION_S "7.0"
|
||||
#define DATA_VERSION_STR "QChar::Unicode_7_0"
|
||||
|
||||
|
||||
static QHash<QByteArray, QChar::UnicodeVersion> age_map;
|
||||
@ -70,6 +70,7 @@ static void initAgeMap()
|
||||
{ QChar::Unicode_6_1, "6.1" },
|
||||
{ QChar::Unicode_6_2, "6.2" },
|
||||
{ QChar::Unicode_6_3, "6.3" },
|
||||
{ QChar::Unicode_7_0, "7.0" },
|
||||
{ QChar::Unicode_Unassigned, 0 }
|
||||
};
|
||||
AgeMap *d = ageMap;
|
||||
@ -694,6 +695,30 @@ static void initScriptMap()
|
||||
{ QChar::Script_Sharada, "Sharada" },
|
||||
{ QChar::Script_SoraSompeng, "SoraSompeng" },
|
||||
{ QChar::Script_Takri, "Takri" },
|
||||
// 7.0
|
||||
{ QChar::Script_CaucasianAlbanian, "CaucasianAlbanian" },
|
||||
{ QChar::Script_BassaVah, "BassaVah" },
|
||||
{ QChar::Script_Duployan, "Duployan" },
|
||||
{ QChar::Script_Elbasan, "Elbasan" },
|
||||
{ QChar::Script_Grantha, "Grantha" },
|
||||
{ QChar::Script_PahawhHmong, "PahawhHmong" },
|
||||
{ QChar::Script_Khojki, "Khojki" },
|
||||
{ QChar::Script_LinearA, "LinearA" },
|
||||
{ QChar::Script_Mahajani, "Mahajani" },
|
||||
{ QChar::Script_Manichaean, "Manichaean" },
|
||||
{ QChar::Script_MendeKikakui, "MendeKikakui" },
|
||||
{ QChar::Script_Modi, "Modi" },
|
||||
{ QChar::Script_Mro, "Mro" },
|
||||
{ QChar::Script_OldNorthArabian, "OldNorthArabian" },
|
||||
{ QChar::Script_Nabataean, "Nabataean" },
|
||||
{ QChar::Script_Palmyrene, "Palmyrene" },
|
||||
{ QChar::Script_PauCinHau, "PauCinHau" },
|
||||
{ QChar::Script_OldPermic, "OldPermic" },
|
||||
{ QChar::Script_PsalterPahlavi, "PsalterPahlavi" },
|
||||
{ QChar::Script_Siddham, "Siddham" },
|
||||
{ QChar::Script_Khudawadi, "Khudawadi" },
|
||||
{ QChar::Script_Tirhuta, "Tirhuta" },
|
||||
{ QChar::Script_WarangCiti, "WarangCiti" },
|
||||
// unhandled
|
||||
{ QChar::Script_Unknown, 0 }
|
||||
};
|
||||
@ -712,23 +737,23 @@ static const char *property_string =
|
||||
" ushort direction : 8; /* 5 used */\n"
|
||||
" ushort combiningClass : 8;\n"
|
||||
" ushort joining : 3;\n"
|
||||
" signed short digitValue : 5; /* 5 used */\n"
|
||||
" signed short digitValue : 5;\n"
|
||||
" signed short mirrorDiff : 16;\n"
|
||||
" signed short lowerCaseDiff : 16;\n"
|
||||
" signed short upperCaseDiff : 16;\n"
|
||||
" signed short titleCaseDiff : 16;\n"
|
||||
" signed short caseFoldDiff : 16;\n"
|
||||
" ushort lowerCaseSpecial : 1;\n"
|
||||
" signed short lowerCaseDiff : 15;\n"
|
||||
" ushort upperCaseSpecial : 1;\n"
|
||||
" signed short upperCaseDiff : 15;\n"
|
||||
" ushort titleCaseSpecial : 1;\n"
|
||||
" signed short titleCaseDiff : 15;\n"
|
||||
" ushort caseFoldSpecial : 1;\n"
|
||||
" ushort unicodeVersion : 4;\n"
|
||||
" signed short caseFoldDiff : 15;\n"
|
||||
" ushort unicodeVersion : 8; /* 5 used */\n"
|
||||
" ushort nfQuickCheck : 8;\n" // could be narrowed
|
||||
" ushort graphemeBreakClass : 4; /* 4 used */\n"
|
||||
" ushort wordBreakClass : 4; /* 4 used */\n"
|
||||
" ushort sentenceBreakClass : 8; /* 4 used */\n"
|
||||
" ushort lineBreakClass : 8; /* 6 used */\n"
|
||||
" ushort script : 8; /* 7 used */\n"
|
||||
" ushort script : 8;\n"
|
||||
"};\n\n"
|
||||
"Q_CORE_EXPORT const Properties * QT_FASTCALL properties(uint ucs4) Q_DECL_NOTHROW;\n"
|
||||
"Q_CORE_EXPORT const Properties * QT_FASTCALL properties(ushort ucs2) Q_DECL_NOTHROW;\n"
|
||||
@ -786,7 +811,7 @@ struct PropertyFlags {
|
||||
// from ArabicShaping.txt
|
||||
QChar::JoiningType joining : 3;
|
||||
// from DerivedAge.txt
|
||||
QChar::UnicodeVersion age : 4;
|
||||
QChar::UnicodeVersion age : 5;
|
||||
int digitValue;
|
||||
|
||||
int mirrorDiff : 16;
|
||||
@ -849,6 +874,7 @@ static int appendToSpecialCaseMap(const QList<int> &map)
|
||||
return pos;
|
||||
}
|
||||
|
||||
// DerivedCoreProperties.txt
|
||||
static inline bool isDefaultIgnorable(uint ucs4)
|
||||
{
|
||||
// Default_Ignorable_Code_Point:
|
||||
@ -860,9 +886,11 @@ static inline bool isDefaultIgnorable(uint ucs4)
|
||||
return ucs4 == 0xad;
|
||||
|
||||
return ucs4 == 0x034f
|
||||
|| ucs4 == 0x061c
|
||||
|| (ucs4 >= 0x115f && ucs4 <= 0x1160)
|
||||
|| (ucs4 >= 0x17b4 && ucs4 <= 0x17b5)
|
||||
|| (ucs4 >= 0x180b && ucs4 <= 0x180d)
|
||||
|| ucs4 == 0x180e
|
||||
|| (ucs4 >= 0x200b && ucs4 <= 0x200f)
|
||||
|| (ucs4 >= 0x202a && ucs4 <= 0x202e)
|
||||
|| (ucs4 >= 0x2060 && ucs4 <= 0x206f)
|
||||
@ -871,7 +899,9 @@ static inline bool isDefaultIgnorable(uint ucs4)
|
||||
|| ucs4 == 0xfeff
|
||||
|| ucs4 == 0xffa0
|
||||
|| (ucs4 >= 0xfff0 && ucs4 <= 0xfff8)
|
||||
|| (ucs4 >= 0x1d173 && ucs4 <= 0xe0fff && (ucs4 <= 0x1d17a || ucs4 >= 0xe0000));
|
||||
|| (ucs4 >= 0x1bca0 && ucs4 <= 0x1bca3)
|
||||
|| (ucs4 >= 0x1d173 && ucs4 <= 0x1d17a)
|
||||
|| (ucs4 >= 0xe0000 && ucs4 <= 0xe0fff);
|
||||
}
|
||||
|
||||
struct UnicodeData {
|
||||
@ -1092,7 +1122,7 @@ static void readUnicodeData()
|
||||
int upperCase = properties[UD_UpperCase].toInt(&ok, 16);
|
||||
Q_ASSERT(ok);
|
||||
int diff = upperCase - codepoint;
|
||||
if (qAbs(diff) >= (1<<14)) {
|
||||
if (qAbs(diff) >= (1<<13)) {
|
||||
qWarning() << "upperCaseDiff exceeded (" << hex << codepoint << "->" << upperCase << "); map it for special case";
|
||||
// if the condition below doesn't hold anymore we need to modify our special upper casing code in qchar.cpp
|
||||
Q_ASSERT(!QChar::requiresSurrogates(codepoint) && !QChar::requiresSurrogates(upperCase));
|
||||
@ -1112,7 +1142,7 @@ static void readUnicodeData()
|
||||
int lowerCase = properties[UD_LowerCase].toInt(&ok, 16);
|
||||
Q_ASSERT(ok);
|
||||
int diff = lowerCase - codepoint;
|
||||
if (qAbs(diff) >= (1<<14)) {
|
||||
if (qAbs(diff) >= (1<<13)) {
|
||||
qWarning() << "lowerCaseDiff exceeded (" << hex << codepoint << "->" << lowerCase << "); map it for special case";
|
||||
// if the condition below doesn't hold anymore we need to modify our special lower casing code in qchar.cpp
|
||||
Q_ASSERT(!QChar::requiresSurrogates(codepoint) && !QChar::requiresSurrogates(lowerCase));
|
||||
@ -1135,7 +1165,7 @@ static void readUnicodeData()
|
||||
int titleCase = properties[UD_TitleCase].toInt(&ok, 16);
|
||||
Q_ASSERT(ok);
|
||||
int diff = titleCase - codepoint;
|
||||
if (qAbs(diff) >= (1<<14)) {
|
||||
if (qAbs(diff) >= (1<<13)) {
|
||||
qWarning() << "titleCaseDiff exceeded (" << hex << codepoint << "->" << titleCase << "); map it for special case";
|
||||
// if the condition below doesn't hold anymore we need to modify our special title casing code in qchar.cpp
|
||||
Q_ASSERT(!QChar::requiresSurrogates(codepoint) && !QChar::requiresSurrogates(titleCase));
|
||||
@ -1701,7 +1731,7 @@ static void readCaseFolding()
|
||||
if (foldMap.size() == 1) {
|
||||
int caseFolded = foldMap.at(0);
|
||||
int diff = caseFolded - codepoint;
|
||||
if (qAbs(diff) >= (1<<14)) {
|
||||
if (qAbs(diff) >= (1<<13)) {
|
||||
qWarning() << "caseFoldDiff exceeded (" << hex << codepoint << "->" << caseFolded << "); map it for special case";
|
||||
// if the condition below doesn't hold anymore we need to modify our special case folding code in qchar.cpp
|
||||
Q_ASSERT(!QChar::requiresSurrogates(codepoint) && !QChar::requiresSurrogates(caseFolded));
|
||||
@ -2182,10 +2212,10 @@ static QByteArray createPropertyInfo()
|
||||
|
||||
// we reserve one bit more than in the assert below for the sign
|
||||
Q_ASSERT(maxMirroredDiff < (1<<12));
|
||||
Q_ASSERT(maxLowerCaseDiff < (1<<14));
|
||||
Q_ASSERT(maxUpperCaseDiff < (1<<14));
|
||||
Q_ASSERT(maxTitleCaseDiff < (1<<14));
|
||||
Q_ASSERT(maxCaseFoldDiff < (1<<14));
|
||||
Q_ASSERT(maxLowerCaseDiff < (1<<13));
|
||||
Q_ASSERT(maxUpperCaseDiff < (1<<13));
|
||||
Q_ASSERT(maxTitleCaseDiff < (1<<13));
|
||||
Q_ASSERT(maxCaseFoldDiff < (1<<13));
|
||||
|
||||
const int BMP_BLOCKSIZE = 32;
|
||||
const int BMP_SHIFT = 5;
|
||||
@ -2337,37 +2367,37 @@ static QByteArray createPropertyInfo()
|
||||
// " ushort joining : 3;\n"
|
||||
out += QByteArray::number( p.joining );
|
||||
out += ", ";
|
||||
// " signed short digitValue : 5; /* 5 used */\n"
|
||||
// " signed short digitValue : 5;\n"
|
||||
out += QByteArray::number( p.digitValue );
|
||||
out += ", ";
|
||||
// " signed short mirrorDiff : 16;\n"
|
||||
// " signed short lowerCaseDiff : 16;\n"
|
||||
// " signed short upperCaseDiff : 16;\n"
|
||||
// " signed short titleCaseDiff : 16;\n"
|
||||
// " signed short caseFoldDiff : 16;\n"
|
||||
out += QByteArray::number( p.mirrorDiff );
|
||||
out += ", ";
|
||||
// " ushort lowerCaseSpecial : 1;\n"
|
||||
// " signed short lowerCaseDiff : 15;\n"
|
||||
out += QByteArray::number( p.lowerCaseSpecial );
|
||||
out += ", ";
|
||||
out += QByteArray::number( p.lowerCaseDiff );
|
||||
out += ", ";
|
||||
// " ushort upperCaseSpecial : 1;\n"
|
||||
// " signed short upperCaseDiff : 15;\n"
|
||||
out += QByteArray::number( p.upperCaseSpecial );
|
||||
out += ", ";
|
||||
out += QByteArray::number( p.upperCaseDiff );
|
||||
out += ", ";
|
||||
// " ushort titleCaseSpecial : 1;\n"
|
||||
// " signed short titleCaseDiff : 15;\n"
|
||||
out += QByteArray::number( p.titleCaseSpecial );
|
||||
out += ", ";
|
||||
out += QByteArray::number( p.titleCaseDiff );
|
||||
out += ", ";
|
||||
out += QByteArray::number( p.caseFoldDiff );
|
||||
out += ", ";
|
||||
// " ushort lowerCaseSpecial : 1;\n"
|
||||
// " ushort upperCaseSpecial : 1;\n"
|
||||
// " ushort titleCaseSpecial : 1;\n"
|
||||
// " ushort caseFoldSpecial : 1;\n"
|
||||
out += QByteArray::number( p.lowerCaseSpecial );
|
||||
out += ", ";
|
||||
out += QByteArray::number( p.upperCaseSpecial );
|
||||
out += ", ";
|
||||
out += QByteArray::number( p.titleCaseSpecial );
|
||||
out += ", ";
|
||||
// " signed short caseFoldDiff : 15;\n"
|
||||
out += QByteArray::number( p.caseFoldSpecial );
|
||||
out += ", ";
|
||||
// " ushort unicodeVersion : 4;\n"
|
||||
out += QByteArray::number( p.caseFoldDiff );
|
||||
out += ", ";
|
||||
// " ushort unicodeVersion : 8; /* 5 used */\n"
|
||||
out += QByteArray::number( p.age );
|
||||
out += ", ";
|
||||
// " ushort nfQuickCheck : 8;\n"
|
||||
@ -2385,7 +2415,7 @@ static QByteArray createPropertyInfo()
|
||||
out += ", ";
|
||||
out += QByteArray::number( p.lineBreakClass );
|
||||
out += ", ";
|
||||
// " ushort script : 8; /* 7 used */\n"
|
||||
// " ushort script : 8;\n"
|
||||
out += QByteArray::number( p.script );
|
||||
out += " },";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user