From 98f057d55df649353cc6500328a45b0dfe6f833e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 6 Jan 2014 11:49:16 +0300 Subject: add missing auto switch font to japanese or chinese for npc font. --- src/gui/gui.cpp | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 3fe0443ca..f84750e17 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -155,7 +155,6 @@ void Gui::postInit(Graphics *const graphics) if (fontFile.empty()) fontFile = branding.getStringValue("chinaFont"); } - if (fontFile.empty()) fontFile = branding.getStringValue("font"); @@ -169,9 +168,9 @@ void Gui::postInit(Graphics *const graphics) .append("': ").append(e.getMessage())); } + // Set particle font fontFile = config.getValue("particleFont", ""); - if (isJapan) { fontFile = config.getValue("japanFont", ""); @@ -184,8 +183,6 @@ void Gui::postInit(Graphics *const graphics) if (fontFile.empty()) fontFile = branding.getStringValue("chinaFont"); } - - if (fontFile.empty()) fontFile = branding.getStringValue("particleFont"); @@ -200,6 +197,7 @@ void Gui::postInit(Graphics *const graphics) .append("': ").append(e.getMessage())); } + // Set bold font fontFile = config.getValue("boldFont", ""); if (fontFile.empty()) @@ -215,6 +213,7 @@ void Gui::postInit(Graphics *const graphics) .append("': ").append(e.getMessage())); } + // Set help font fontFile = config.getValue("helpFont", ""); if (fontFile.empty()) @@ -230,6 +229,7 @@ void Gui::postInit(Graphics *const graphics) .append("': ").append(e.getMessage())); } + // Set secure font fontFile = config.getValue("secureFont", ""); if (fontFile.empty()) @@ -245,9 +245,22 @@ void Gui::postInit(Graphics *const graphics) .append("': ").append(e.getMessage())); } + // Set npc font - fontFile = config.getValue("npcFont", ""); const int npcFontSize = config.getIntValue("npcfontSize"); + fontFile = config.getValue("npcFont", ""); + if (isJapan) + { + fontFile = config.getValue("japanFont", ""); + 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("npcFont"); -- cgit v1.2.3-70-g09d2