(svn r11764) -Change: make the 'do characters exist in the current font file(s)' more robust.
authorrubidium
Sat, 05 Jan 2008 22:19:27 +0000
changeset 8201 92f3b5542ecb
parent 8200 633e55a3ca3d
child 8202 6ebbaeb5f4b5
(svn r11764) -Change: make the 'do characters exist in the current font file(s)' more robust.
src/strings.cpp
--- a/src/strings.cpp	Sat Jan 05 22:04:11 2008 +0000
+++ b/src/strings.cpp	Sat Jan 05 22:19:27 2008 +0000
@@ -1450,6 +1450,8 @@
  */
 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 @@
 					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