diff options
author | Josh Bell <josh@lindenlab.com> | 2008-04-24 18:38:17 +0000 |
---|---|---|
committer | Josh Bell <josh@lindenlab.com> | 2008-04-24 18:38:17 +0000 |
commit | 5c51ae5a7b48dfac8769e5dbdd10e79b18d90070 (patch) | |
tree | f63729c72f69dcb7d2bd5d9aa3a58c29e0c78128 /indra/llrender/llfontgl.cpp | |
parent | 39018947081772bf7226d757c647520c54b18fd2 (diff) |
svn merge -r 85582:85586 svn+ssh://svn.lindenlab.com/svn/linden/branches/maint-viewer-5-merge
QAR-500 maint-viewer-5 merge
Diffstat (limited to 'indra/llrender/llfontgl.cpp')
-rw-r--r-- | indra/llrender/llfontgl.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index c58517d167..4a3a64f955 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -56,6 +56,7 @@ LLFontGL* LLFontGL::sSansSerif = NULL; LLFontGL* LLFontGL::sSansSerifBig = NULL; LLFontGL* LLFontGL::sSansSerifHuge = NULL; LLFontGL* LLFontGL::sSansSerifBold = NULL; +LLFontList* LLFontGL::sMonospaceFallback = NULL; LLFontList* LLFontGL::sSSFallback = NULL; LLFontList* LLFontGL::sSSSmallFallback = NULL; LLFontList* LLFontGL::sSSBigFallback = NULL; @@ -306,7 +307,21 @@ BOOL LLFontGL::initDefaultFonts(F32 screen_dpi, F32 x_scale, F32 y_scale, sMonospace->reset(); } - failed |= !loadFace(sMonospace, monospace_file, monospace_size, NULL); + if (sMonospaceFallback) + { + delete sMonospaceFallback; + } + sMonospaceFallback = new LLFontList(); + if (!loadFaceFallback( + sMonospaceFallback, + sanserif_fallback_file, + monospace_size * ss_fallback_scale)) + { + delete sMonospaceFallback; + sMonospaceFallback = NULL; + } + + failed |= !loadFace(sMonospace, monospace_file, monospace_size, sMonospaceFallback); // // Sans-serif fonts @@ -466,6 +481,9 @@ void LLFontGL::destroyDefaultFonts() delete sSansSerifBold; sSansSerifBold = NULL; + delete sMonospaceFallback; + sMonospaceFallback = NULL; + delete sSSHugeFallback; sSSHugeFallback = NULL; |