summaryrefslogtreecommitdiff
path: root/src/strings.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-12-10 12:56:37 +0000
committerrubidium <rubidium@openttd.org>2011-12-10 12:56:37 +0000
commitebb3ad33ffdb950edf159d5bbcf14b56191ac0b2 (patch)
tree8461988317bdc3430e3cc3b9c3f33f707cb9d76a /src/strings.cpp
parent6cbeb9e745c9eb3f0b5b768fdb9ed81a98b8fb02 (diff)
downloadopenttd-ebb3ad33ffdb950edf159d5bbcf14b56191ac0b2.tar.xz
(svn r23472) -Fix [FS#4877]: the monospace font broke the bootstrap GUI's ability to find a font
Diffstat (limited to 'src/strings.cpp')
-rw-r--r--src/strings.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/strings.cpp b/src/strings.cpp
index 06c4132d5..e15d30e00 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -1778,7 +1778,7 @@ bool MissingGlyphSearcher::FindMissingGlyphs(const char **str)
InitFreeType(this->Monospace());
const Sprite *question_mark[FS_END];
- for (FontSize size = FS_BEGIN; size < FS_END; size++) {
+ for (FontSize size = this->Monospace() ? FS_MONO : FS_BEGIN; size < (this->Monospace() ? FS_END : FS_MONO); size++) {
question_mark[size] = GetGlyph(size, '?');
}
@@ -1903,12 +1903,12 @@ void CheckForMissingGlyphs(bool base_font, MissingGlyphSearcher *searcher)
ShowErrorMessage(STR_JUST_RAW_STRING, INVALID_STRING_ID, WL_WARNING);
/* Reset the font width */
- LoadStringWidthTable();
+ LoadStringWidthTable(searcher->Monospace());
return;
}
/* Update the font with cache */
- LoadStringWidthTable();
+ LoadStringWidthTable(searcher->Monospace());
#if !defined(WITH_ICU)
/*