summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index db3faa314..3fe0443ca 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -137,6 +137,8 @@ void Gui::postInit(Graphics *const graphics)
const StringVect langs = getLang();
const bool isJapan = (!langs.empty() && langs[0].size() > 3
&& langs[0].substr(0, 3) == "ja_");
+ const bool isChinese = (!langs.empty() && langs[0].size() > 3
+ && langs[0].substr(0, 3) == "zh_");
// Set global font
const int fontSize = config.getIntValue("fontSize");
@@ -147,6 +149,12 @@ void Gui::postInit(Graphics *const graphics)
if (fontFile.empty())
fontFile = branding.getStringValue("japanFont");
}
+ else if(isChinese)
+ {
+ fontFile = config.getValue("chinaFont", "");
+ if (fontFile.empty())
+ fontFile = branding.getStringValue("chinaFont");
+ }
if (fontFile.empty())
fontFile = branding.getStringValue("font");
@@ -170,6 +178,12 @@ void Gui::postInit(Graphics *const graphics)
if (fontFile.empty())
fontFile = branding.getStringValue("japanFont");
}
+ else if(isChinese)
+ {
+ fontFile = config.getValue("chinaFont", "");
+ if (fontFile.empty())
+ fontFile = branding.getStringValue("chinaFont");
+ }
if (fontFile.empty())