diff options
-rw-r--r-- | src/gui/gui.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index bd855a598..3d79f0cdf 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -105,14 +105,14 @@ Gui::Gui(Graphics *graphics): Window::setWindowContainer(guiTop); setTop(guiTop); + const std::vector<std::string> langs = getLang(); + const bool isJapan = (!langs.empty() && langs[0].size() > 3 + && langs[0].substr(0, 3) == "ja_"); + // Set global font const int fontSize = config.getIntValue("fontSize"); - std::string fontFile = config.getValue("font", ""); - - std::vector<std::string> langs = getLang(); - if (!langs.empty() && langs[0].size() > 3 - && langs[0].substr(0, 3) == "ja_") + if (isJapan) { fontFile = config.getValue("japanFont", ""); if (fontFile.empty()) @@ -134,6 +134,15 @@ Gui::Gui(Graphics *graphics): // Set particle font fontFile = config.getValue("particleFont", ""); + + if (isJapan) + { + fontFile = config.getValue("japanFont", ""); + if (fontFile.empty()) + fontFile = branding.getStringValue("japanFont"); + } + + if (fontFile.empty()) fontFile = branding.getStringValue("particleFont"); |