From 8afb22a603c1b97543941dd6f9dd4abc20cfb3d2 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Wed, 25 May 2011 23:34:25 +0000 Subject: [PATCH] - added a small addition so windows users can optionally use different font setting in lng files if required --- source/glest_game/main/main.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/source/glest_game/main/main.cpp b/source/glest_game/main/main.cpp index d0b99728..66689ef1 100644 --- a/source/glest_game/main/main.cpp +++ b/source/glest_game/main/main.cpp @@ -2549,6 +2549,28 @@ int glestMain(int argc, char** argv) { if( lang.hasString("FONT_MULTIBYTE")) { Font::fontIsMultibyte = strToBool(lang.get("FONT_MULTIBYTE")); } + +#if defined(WIN32) + // Win32 overrides for fonts (just in case they must be different) + if( lang.hasString("FONT_CHARCOUNT_WINDOWS")) { + // 256 for English + // 30000 for Chinese + Font::charCount = strToInt(lang.get("FONT_CHARCOUNT_WINDOWS")); + } + if( lang.hasString("FONT_TYPENAME_WINDOWS")) { + Font::fontTypeName = lang.get("FONT_TYPENAME_WINDOWS"); + } + if( lang.hasString("FONT_CHARSET_WINDOWS")) { + // Example values: + // DEFAULT_CHARSET (English) = 1 + // GB2312_CHARSET (Chinese) = 134 + Shared::Platform::charSet = strToInt(lang.get("FONT_CHARSET_WINDOWS")); + } + if( lang.hasString("FONT_MULTIBYTE_WINDOWS")) { + Font::fontIsMultibyte = strToBool(lang.get("FONT_MULTIBYTE_WINDOWS")); + } + // end win32 +#endif SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] Font::charCount = %d, Font::fontTypeName [%s] Shared::Platform::charSet = %d, Font::fontIsMultibyte = %d\n",__FILE__,__FUNCTION__,__LINE__,Font::charCount,Font::fontTypeName.c_str(),Shared::Platform::charSet,Font::fontIsMultibyte); if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Using Font::charCount = %d, Font::fontTypeName [%s] Shared::Platform::charSet = %d, Font::fontIsMultibyte = %d\n",Font::charCount,Font::fontTypeName.c_str(),Shared::Platform::charSet,Font::fontIsMultibyte);