1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-29 01:19:11 +00:00

(svn r23271) -Codechange: don't repeatedly initialise and free the freetype library

This commit is contained in:
rubidium
2011-11-20 08:08:13 +00:00
parent 5638eaa307
commit 542c61397c
4 changed files with 41 additions and 36 deletions

View File

@@ -1750,10 +1750,7 @@ const char *GetCurrentLanguageIsoCode()
*/
bool MissingGlyphSearcher::FindMissingGlyphs(const char **str)
{
#ifdef WITH_FREETYPE
UninitFreeType();
InitFreeType();
#endif
const Sprite *question_mark[FS_END];
for (FontSize size = FS_BEGIN; size < FS_END; size++) {
@@ -1856,7 +1853,6 @@ void CheckForMissingGlyphsInLoadedLanguagePack(bool base_font)
/* 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 */
UninitFreeType();
InitFreeType();
}
}