diff options
Diffstat (limited to 'indra/llwindow')
-rw-r--r-- | indra/llwindow/llwindow.cpp | 10 | ||||
-rw-r--r-- | indra/llwindow/llwindow.h | 2 | ||||
-rw-r--r-- | indra/llwindow/llwindowmacosx.cpp | 9 | ||||
-rw-r--r-- | indra/llwindow/llwindowmacosx.h | 2 | ||||
-rw-r--r-- | indra/llwindow/llwindowsdl.cpp | 20 | ||||
-rw-r--r-- | indra/llwindow/llwindowsdl.h | 2 | ||||
-rw-r--r-- | indra/llwindow/llwindowwin32.cpp | 7 | ||||
-rw-r--r-- | indra/llwindow/llwindowwin32.h | 2 |
8 files changed, 30 insertions, 24 deletions
diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp index bd7c4d8410..fb4770e847 100644 --- a/indra/llwindow/llwindow.cpp +++ b/indra/llwindow/llwindow.cpp @@ -309,16 +309,16 @@ void *LLWindow::getMediaWindow() } // static -std::string LLWindow::getFontListSans() +std::vector<std::string> LLWindow::getDynamicFallbackFontList() { #if LL_WINDOWS - return LLWindowWin32::getFontListSans(); + return LLWindowWin32::getDynamicFallbackFontList(); #elif LL_DARWIN - return LLWindowMacOSX::getFontListSans(); + return LLWindowMacOSX::getDynamicFallbackFontList(); #elif LL_SDL - return LLWindowSDL::getFontListSans(); + return LLWindowSDL::getDynamicFallbackFontList(); #else - return ""; + return std::vector<std::string>(); #endif } diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h index ae33c5a814..9e01596b81 100644 --- a/indra/llwindow/llwindow.h +++ b/indra/llwindow/llwindow.h @@ -198,7 +198,7 @@ public: virtual void interruptLanguageTextInput() {} virtual void spawnWebBrowser(const std::string& escaped_url) {}; - static std::string getFontListSans(); + static std::vector<std::string> getDynamicFallbackFontList(); protected: LLWindow(BOOL fullscreen, U32 flags); diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 8d446f18f1..4f6df0f152 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -3358,10 +3358,9 @@ void LLWindowMacOSX::interruptLanguageTextInput() } //static -std::string LLWindowMacOSX::getFontListSans() +std::vector<std::string> LLWindowMacOSX::getDynamicFallbackFontList() { - // This is a fairly complete Japanese font that ships with Mac OS X. - // The first filename is in UTF8, but it shows up in the font menu as "Hiragino Kaku Gothic Pro W3". - // The third filename is in UTF8, but it shows up in the font menu as "STHeiti Light" - return "\xE3\x83\x92\xE3\x83\xA9\xE3\x82\xAD\xE3\x82\x99\xE3\x83\x8E\xE8\xA7\x92\xE3\x82\xB3\xE3\x82\x99 Pro W3.otf;\xE3\x83\x92\xE3\x83\xA9\xE3\x82\xAD\xE3\x82\x99\xE3\x83\x8E\xE8\xA7\x92\xE3\x82\xB3\xE3\x82\x99 ProN W3.otf;AppleGothic.dfont;AppleGothic.ttf;\xe5\x8d\x8e\xe6\x96\x87\xe7\xbb\x86\xe9\xbb\x91.ttf"; + // Fonts previously in getFontListSans() have moved to fonts.xml. + return std::vector<std::string>(); } + diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h index 9135fb9ef6..3886782732 100644 --- a/indra/llwindow/llwindowmacosx.h +++ b/indra/llwindow/llwindowmacosx.h @@ -113,7 +113,7 @@ public: /*virtual*/ void interruptLanguageTextInput(); /*virtual*/ void spawnWebBrowser(const std::string& escaped_url); - static std::string getFontListSans(); + static std::vector<std::string> getDynamicFallbackFontList(); protected: LLWindowMacOSX( diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index a85cbcf9b9..d6ee7acbaa 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -2353,7 +2353,7 @@ void LLWindowSDL::bringToFront() } //static -std::string LLWindowSDL::getFontListSans() +std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList() { // Use libfontconfig to find us a nice ordered list of fallback fonts // specific to this system. @@ -2370,7 +2370,7 @@ std::string LLWindowSDL::getFontListSans() // renderable range if for some reason our FreeType actually fails // to use some of the fonts we want it to. const bool elide_unicode_coverage = true; - std::string rtn; + std::vector<std::string> rtns; FcFontSet *fs = NULL; FcPattern *sortpat = NULL; int font_count = 0; @@ -2404,7 +2404,8 @@ std::string LLWindowSDL::getFontListSans() if (!FcInit()) { llwarns << "FontConfig failed to initialize." << llendl; - return final_fallback; + rtns.push_back(final_fallback); + return rtns; } sortpat = FcNameParse((FcChar8*) sort_order.c_str()); @@ -2429,17 +2430,24 @@ std::string LLWindowSDL::getFontListSans() &filename) && filename) { - rtn += std::string((const char*)filename)+";"; + rtns.push_back(std::string((const char*)filename)); ++font_count; } } FcFontSetDestroy (fs); } - lldebugs << "Using font list: " << rtn << llendl; + lldebugs << "Using font list: " << llendl; + for (std::vector<std::string>::iterator it = rtns.begin(); + it != rtns.end(); + ++it) + { + lldebugs << " file: " << *it << llendl; + } llinfos << "Using " << font_count << " system font(s)." << llendl; - return rtn + final_fallback; + rtns.push_back(final_fallback); + return rtns; } #endif // LL_SDL diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h index 7ac3d980fc..cebb151764 100644 --- a/indra/llwindow/llwindowsdl.h +++ b/indra/llwindow/llwindowsdl.h @@ -119,7 +119,7 @@ public: /*virtual*/ void spawnWebBrowser(const std::string& escaped_url); - static std::string getFontListSans(); + static std::vector<std::string> getDynamicFallbackFontList(); // Not great that these are public, but they have to be accessible // by non-class code and it's better than making them global. diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index b1eb4d9391..6280868dfb 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -3654,11 +3654,10 @@ BOOL LLWindowWin32::handleImeRequests(U32 request, U32 param, LRESULT *result) } //static -std::string LLWindowWin32::getFontListSans() +std::vector<std::string> LLWindowWin32::getDynamicFallbackFontList() { - // Lists Japanese, Korean, and Chinese sanserif fonts available in - // Windows XP and Vista, as well as "Arial Unicode MS". - return "MSGOTHIC.TTC;gulim.ttc;simhei.ttf;ArialUni.ttf"; + // Fonts previously in getFontListSans() have moved to fonts.xml. + return std::vector<std::string>(); } diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h index 7495dcbf7a..237f834318 100644 --- a/indra/llwindow/llwindowwin32.h +++ b/indra/llwindow/llwindowwin32.h @@ -112,7 +112,7 @@ public: /*virtual*/ void interruptLanguageTextInput(); /*virtual*/ void spawnWebBrowser(const std::string& escaped_url); - static std::string getFontListSans(); + static std::vector<std::string> getDynamicFallbackFontList(); protected: LLWindowWin32( |