diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2018-12-17 15:23:57 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2018-12-17 15:23:57 -0500 |
commit | 4b99e6a1f11efe66b3fb0aa3b6fa721afe698446 (patch) | |
tree | 0a82d37edb6e5d5dba6a89ebdf8ade2b9982715c /indra/llrender/llfontgl.cpp | |
parent | 11f23ca436d65c4a896be8718b2fb5dae1e5c314 (diff) |
SL-10252: On Windows, use $SystemRoot again, not FOLDERID_Fonts.
Diffstat (limited to 'indra/llrender/llfontgl.cpp')
-rw-r--r-- | indra/llrender/llfontgl.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index 9b43680949..8cd18c5fa1 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -40,6 +40,7 @@ #include "v4color.h" #include "lltexture.h" #include "lldir.h" +#include "llstring.h" // Third party library includes #include <boost/tokenizer.hpp> @@ -1074,6 +1075,14 @@ std::string LLFontGL::getFontPathSystem() return "/System/Library/Fonts/"; #elif LL_WINDOWS + auto system_root = LLStringUtil::getenv("SystemRoot"); + if (! system_root.empty()) + { + std::string fontpath(gDirUtilp->add(system_root, "fonts") + gDirUtilp->getDirDelimiter()); + LL_INFOS() << "from SystemRoot: " << fontpath << LL_ENDL; + return fontpath; + } + wchar_t *pwstr = NULL; HRESULT okay = SHGetKnownFolderPath(FOLDERID_Fonts, 0, NULL, &pwstr); if (SUCCEEDED(okay) && pwstr) @@ -1081,6 +1090,7 @@ std::string LLFontGL::getFontPathSystem() std::string fontpath(ll_convert_wide_to_string(pwstr)); // SHGetKnownFolderPath() contract requires us to free pwstr CoTaskMemFree(pwstr); + LL_INFOS() << "from SHGetKnownFolderPath(): " << fontpath << LL_ENDL; return fontpath; } #endif |