summaryrefslogtreecommitdiffstats
path: root/arch/master/trinity-qt3/eastern_asian_languagues.diff
blob: 7c25eef7d5329cf35f6b6335cd07b2ba0bfb9ed9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
--- qt-x11-free-3.3.8b/src/kernel/qfontdatabase.cpp	2008-01-15 21:09:13.000000000 +0200
+++ qt-x11-free-3.3.8b/src/kernel/qfontdatabase.cpp	2008-03-10 11:34:22.000000000 +0200
@@ -966,20 +966,22 @@
 
 #ifdef Q_WS_X11
     if (script == QFont::Han) {
-	// modify script according to locale
-	static QFont::Script defaultHan = QFont::UnknownScript;
-	if (defaultHan == QFont::UnknownScript) {
-	    QCString locale = setlocale(LC_ALL, NULL);
-	    if (locale.contains("ko"))
-		defaultHan = QFont::Han_Korean;
-	    else if (locale.contains("zh_TW") || locale.contains("zh_HK"))
-		defaultHan = QFont::Han_TraditionalChinese;
-	    else if (locale.contains("zh"))
-		defaultHan = QFont::Han_SimplifiedChinese;
-	    else
-		defaultHan = QFont::Han_Japanese;
-	}
-	script = defaultHan;
+        // modify script according to locale
+        static QFont::Script defaultHan;
+        QCString locale = setlocale(LC_ALL, NULL);
+
+        if (locale.contains("ko"))
+            defaultHan = QFont::Han_Korean;
+        else if (locale.contains("zh_TW") || locale.contains("zh_HK"))
+            defaultHan = QFont::Han_TraditionalChinese;
+        else if (locale.contains("zh"))
+            defaultHan = QFont::Han_SimplifiedChinese;
+        else if (locale.contains("ja"))
+            defaultHan = QFont::Han_Japanese;
+        else
+            defaultHan = QFont::Han; // don't change
+
+        script = defaultHan;
     }
 #endif