Changeset - r18424:91195beac0ac
[Not reviewed]
master
0 2 0
rubidium - 13 years ago 2011-11-20 12:01:42
rubidium@openttd.org
(svn r23276) -Codechange: add the answer for the question whether we're looking for monospace fonts in the searcher
2 files changed with 13 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/strings.cpp
Show inline comments
 
@@ -1750,7 +1750,7 @@ const char *GetCurrentLanguageIsoCode()
 
 */
 
bool MissingGlyphSearcher::FindMissingGlyphs(const char **str)
 
{
 
	InitFreeType(false);
 
	InitFreeType(this->Monospace());
 
	const Sprite *question_mark[FS_END];
 

	
 
	for (FontSize size = FS_BEGIN; size < FS_END; size++) {
 
@@ -1813,6 +1813,11 @@ class LanguagePackGlyphSearcher : public
 
		return ret;
 
	}
 

	
 
	/* virtual */ bool Monospace()
 
	{
 
		return false;
 
	}
 

	
 
	/* virtual */ void SetFontNames(FreeTypeSettings *settings, const char *font_name)
 
	{
 
#ifdef WITH_FREETYPE
 
@@ -1856,7 +1861,7 @@ void CheckForMissingGlyphs(bool base_fon
 
			/* Our fallback font does miss characters too, so keep the
 
			 * user chosen font as that is more likely to be any good than
 
			 * the wild guess we made */
 
			InitFreeType(false);
 
			InitFreeType(searcher->Monospace());
 
		}
 
	}
 
#endif
src/strings_func.h
Show inline comments
 
@@ -223,6 +223,12 @@ public:
 
	virtual void Reset() = 0;
 

	
 
	/**
 
	 * Whether to search for a monospace font or not.
 
	 * @return True if searching for monospace.
 
	 */
 
	virtual bool Monospace() = 0;
 

	
 
	/**
 
	 * Set the right font names.
 
	 * @param settings  The settings to modify.
 
	 * @param font_name The new font name.
0 comments (0 inline, 0 general)