Changeset - r19116:609e37882a23
[Not reviewed]
master
0 3 0
frosch - 12 years ago 2012-02-25 17:20:02
frosch@openttd.org
(svn r23987) -Fix (r23000): Also reset the font glyph cache when switching blitters.
3 files changed with 10 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/fontcache.cpp
Show inline comments
 
@@ -974,6 +974,14 @@ void UninitFreeType()
 
	_library = NULL;
 
}
 

	
 
/**
 
 * Reset cached glyphs.
 
 */
 
void ClearFontCache()
 
{
 
	ResetGlyphCache(true);
 
	ResetGlyphCache(false);
 
}
 

	
 
static FT_Face GetFontFace(FontSize size)
 
{
src/fontcache.h
Show inline comments
 
@@ -44,6 +44,7 @@ extern FreeTypeSettings _freetype;
 

	
 
void InitFreeType(bool monospace);
 
void UninitFreeType();
 
void ClearFontCache();
 
const Sprite *GetGlyph(FontSize size, uint32 key);
 
uint GetGlyphWidth(FontSize size, uint32 key);
 
bool GetDrawGlyphShadow();
src/gfxinit.cpp
Show inline comments
 
@@ -256,6 +256,7 @@ void GfxLoadSprites()
 
	DEBUG(sprite, 2, "Loading sprite set %d", _settings_game.game_creation.landscape);
 

	
 
	SwitchNewGRFBlitter();
 
	ClearFontCache();
 
	GfxInitSpriteMem();
 
	LoadSpriteTables();
 
	GfxInitPalettes();
0 comments (0 inline, 0 general)