Merge branch 'master' into jgrpp
# Conflicts: # src/cargopacket.h # src/cargotype.h # src/station_base.h # src/station_cmd.cpp # src/timer/timer_game_common.h # src/town.h
This commit is contained in:
@@ -74,15 +74,15 @@ void UpdateFontHeightCache()
|
||||
}
|
||||
|
||||
/* Check if a glyph should be rendered with anti-aliasing. */
|
||||
bool GetFontAAState(FontSize size, bool check_blitter)
|
||||
bool GetFontAAState()
|
||||
{
|
||||
/* AA is only supported for 32 bpp */
|
||||
if (check_blitter && BlitterFactory::GetCurrentBlitter()->GetScreenDepth() != 32) return false;
|
||||
if (BlitterFactory::GetCurrentBlitter()->GetScreenDepth() != 32) return false;
|
||||
|
||||
return _fcsettings.global_aa || GetFontCacheSubSetting(size)->aa;
|
||||
return _fcsettings.global_aa;
|
||||
}
|
||||
|
||||
void SetFont(FontSize fontsize, const std::string &font, uint size, bool aa)
|
||||
void SetFont(FontSize fontsize, const std::string &font, uint size)
|
||||
{
|
||||
FontCacheSubSetting *setting = GetFontCacheSubSetting(fontsize);
|
||||
bool changed = false;
|
||||
@@ -97,11 +97,6 @@ void SetFont(FontSize fontsize, const std::string &font, uint size, bool aa)
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if (setting->aa != aa) {
|
||||
setting->aa = aa;
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if (!changed) return;
|
||||
|
||||
if (fontsize != FS_MONO) {
|
||||
@@ -216,19 +211,6 @@ void UninitFontCache()
|
||||
#endif /* WITH_FREETYPE */
|
||||
}
|
||||
|
||||
/**
|
||||
* Should any of the active fonts be anti-aliased?
|
||||
* @return True if any of the loaded fonts want anti-aliased drawing.
|
||||
*/
|
||||
bool HasAntialiasedFonts()
|
||||
{
|
||||
for (FontSize fs = FS_BEGIN; fs < FS_END; fs++) {
|
||||
if (!FontCache::Get(fs)->IsBuiltInFont() && GetFontAAState(fs, false)) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#if !defined(_WIN32) && !defined(__APPLE__) && !defined(WITH_FONTCONFIG) && !defined(WITH_COCOA)
|
||||
|
||||
bool SetFallbackFont(FontCacheSettings *, const std::string &, int, MissingGlyphSearcher *) { return false; }
|
||||
|
Reference in New Issue
Block a user