diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2009-11-06 11:03:10 (GMT) |
---|---|---|
committer | Lars Knoll <lars.knoll@nokia.com> | 2009-11-06 11:05:43 (GMT) |
commit | 2e429e40eeed266c7062502c4f7b43092340f264 (patch) | |
tree | 5c3e7d40a20973837891e0f98666469e4e4b2df3 /src/gui/text/qfontdatabase.cpp | |
parent | b8a8110ead6fe5d4a985fe9d486dd8f470aa24eb (diff) | |
download | Qt-2e429e40eeed266c7062502c4f7b43092340f264.zip Qt-2e429e40eeed266c7062502c4f7b43092340f264.tar.gz Qt-2e429e40eeed266c7062502c4f7b43092340f264.tar.bz2 |
add support for the N'Ko writing system to Qt
Enables N'Ko support in Qt, after having now a harfbuzz version
that supports it.
Task-number: QTBUG-1042
Reviewed-by: Gunnar
Diffstat (limited to 'src/gui/text/qfontdatabase.cpp')
-rw-r--r-- | src/gui/text/qfontdatabase.cpp | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index fb8444e..7d17e49 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -534,6 +534,12 @@ static int requiredUnicodeBits[QFontDatabase::WritingSystemsCount][2] = { { 0, 127 }, // same as latin1 // Other, { 126, 127 } + // Ogham, + { 78, 127 }, + // Runic, + { 79, 127 }, + // Nko, + { 14, 127 }, }; #define SimplifiedChineseCsbBit 18 @@ -873,7 +879,8 @@ static const int scriptForWritingSystem[] = { QUnicodeTables::Common, // Braille QUnicodeTables::Common, // Symbol QUnicodeTables::Ogham, // Ogham - QUnicodeTables::Runic // Runic + QUnicodeTables::Runic, // Runic + QUnicodeTables::Nko // Nko }; @@ -881,12 +888,12 @@ static const int scriptForWritingSystem[] = { static inline bool requiresOpenType(int writingSystem) { return ((writingSystem >= QFontDatabase::Syriac && writingSystem <= QFontDatabase::Sinhala) - || writingSystem == QFontDatabase::Khmer); + || writingSystem == QFontDatabase::Khmer || writingSystem == QFontDatabase::Nko); } static inline bool scriptRequiresOpenType(int script) { return ((script >= QUnicodeTables::Syriac && script <= QUnicodeTables::Sinhala) - || script == QUnicodeTables::Khmer); + || script == QUnicodeTables::Khmer || script == QUnicodeTables::Nko); } #endif @@ -1558,6 +1565,7 @@ QFontDatabase::QFontDatabase() \value Other (the same as Symbol) \value Ogham \value Runic + \value Nko \omitvalue WritingSystemsCount */ @@ -2232,6 +2240,9 @@ QString QFontDatabase::writingSystemName(WritingSystem writingSystem) case Runic: name = QT_TRANSLATE_NOOP("QFontDatabase", "Runic"); break; + case Nko: + name = QT_TRANSLATE_NOOP("QFontDatabase", "N'Ko"); + break; default: Q_ASSERT_X(false, "QFontDatabase::writingSystemName", "invalid 'writingSystem' parameter"); break; @@ -2445,6 +2456,12 @@ QString QFontDatabase::writingSystemSample(WritingSystem writingSystem) sample += QChar(0x16a2); sample += QChar(0x16a3); break; + case Nko: + sample += QChar(0x7ca); + sample += QChar(0x7cb); + sample += QChar(0x7cc); + sample += QChar(0x7cd); + break; default: break; } |