summaryrefslogtreecommitdiffstats
path: root/util/unicode/writingSystems.sh
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2009-04-17 14:06:06 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2009-04-17 14:06:06 (GMT)
commitf15b8a83e2e51955776a3f07cb85ebfc342dd8ef (patch)
treec5dc684986051654898db11ce73e03b9fec8db99 /util/unicode/writingSystems.sh
downloadQt-f15b8a83e2e51955776a3f07cb85ebfc342dd8ef.zip
Qt-f15b8a83e2e51955776a3f07cb85ebfc342dd8ef.tar.gz
Qt-f15b8a83e2e51955776a3f07cb85ebfc342dd8ef.tar.bz2
Initial import of statemachine branch from the old kinetic repository
Diffstat (limited to 'util/unicode/writingSystems.sh')
-rwxr-xr-xutil/unicode/writingSystems.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/util/unicode/writingSystems.sh b/util/unicode/writingSystems.sh
new file mode 100755
index 0000000..0fdc7a3
--- /dev/null
+++ b/util/unicode/writingSystems.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# This script generates the QFontDatabase::WritingSystem enum. It
+# uses the Unicode 4.0 Scripts.txt data file as the source, with the
+# following modifications:
+#
+# * Inherited is removed
+# * East Asian scripts (chapter 11) are renamed to: SimplifiedChinese,
+# TraditionalChinese, Japanese, Korean, Vietnamese
+# * Additiona Modern scripts (chapter 12) are removed
+# * Archaic scripts (chapter 13) are removed
+
+grep -Ev "(^[[:space:]]*#|^$)" data/Scripts.txt \
+ | awk '{print $3}' \
+ | grep -Ev "(Inherited|Hangul|Ogham|Old_Italic|Runic|Gothic|Ugaritic|Linear_B|Cypriot|Katakana_Or_Hiragana|Ethiopic|Mongolian|Osmanya|Cherokee|Canadian_Aboriginal|Deseret|Shavian)" \
+ | sed -e s,_,,g -e 's,^Common$,Any,' -e 's,^Hiragana$,SimplifiedChinese NEWLINE TraditionalChinese,' -e 's,^Katakana$,Japanese,' -e 's,^Bopomofo$,Korean,' -e 's,^Han$,Vietnamese,' -e 's,^#$,,' \
+ | uniq > writingSystems
+echo "" >> writingSystems
+echo "Other" >> writingSystems