1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-18 09:52:44 +01:00

Codechange: Initialise/reset font cache with FontSizes bitset. (#14448)

Instead of choosing either "Normal/Small/Large" or "Monospace", use an EnumBitSet to allow any combination.
This commit is contained in:
Peter Nelson
2025-07-18 18:23:28 +01:00
committed by GitHub
parent 03672ed8eb
commit 0dc40877fd
11 changed files with 36 additions and 31 deletions

View File

@@ -2369,7 +2369,7 @@ static bool ConFont(std::span<std::string_view> argv)
FontCacheSubSetting *setting = GetFontCacheSubSetting(fs);
/* Make sure all non sprite fonts are loaded. */
if (!setting->font.empty() && !fc->HasParent()) {
InitFontCache(fs == FS_MONO);
InitFontCache(fs);
fc = FontCache::Get(fs);
}
IConsolePrint(CC_DEFAULT, "{} font:", FontSizeToName(fs));