summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-01-05 22:19:27 +0000
committerrubidium <rubidium@openttd.org>2008-01-05 22:19:27 +0000
commit902b8107877b3022df26b2e9eb68525bead2c525 (patch)
tree6d99760fe2415bc904c2f7f391f0feb79b967fb1
parent4023920f22a3f12c6fd211eeccfb7f89d4977f43 (diff)
downloadopenttd-902b8107877b3022df26b2e9eb68525bead2c525.tar.xz
(svn r11764) -Change: make the 'do characters exist in the current font file(s)' more robust.
-rw-r--r--src/strings.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/strings.cpp b/src/strings.cpp
index 71334143c..88cd91f5f 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -1450,6 +1450,8 @@ void InitializeLanguagePacks()
*/
void CheckForMissingGlyphsInLoadedLanguagePack()
{
+ const Sprite *question_mark = GetGlyph(FS_NORMAL, '?');
+
for (uint i = 0; i != 32; i++) {
for (uint j = 0; j < _langtab_num[i]; j++) {
const char *string = _langpack_offs[_langtab_start[i] + j];
@@ -1465,7 +1467,7 @@ void CheckForMissingGlyphsInLoadedLanguagePack()
string++;
} else if (c == SCC_SETXY) {
string += 2;
- } else if (IsPrintable(c) && GetUnicodeGlyph(FS_NORMAL, c) == 0) {
+ } else if (IsPrintable(c) && c != '?' && GetGlyph(FS_NORMAL, c) == question_mark) {
/*
* The character is printable, but not in the normal font.
* This is the case we were testing for. In this case we