summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llfontgl.cpp20
-rw-r--r--indra/llrender/llfontgl.h1
2 files changed, 20 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;
diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h
index 196d063840..e49a9fc296 100644
--- a/indra/llrender/llfontgl.h
+++ b/indra/llrender/llfontgl.h
@@ -228,6 +228,7 @@ public:
static LLString sAppDir; // For loading fonts
static LLFontGL* sMonospace; // medium
+ static LLFontList* sMonospaceFallback;
static LLFontGL* sSansSerifSmall; // small
static LLFontList* sSSSmallFallback;