mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-16 17:02:37 +01:00
Codechange: Use ProviderManager interface to register FontCache factories.
This removes use of #ifdefs to select the appropriate loader, and also replaces FontCache self-registration.
This commit is contained in:
committed by
Peter Nelson
parent
ed1262cab9
commit
140f2b291a
@@ -1253,7 +1253,7 @@ static void GfxMainBlitter(const Sprite *sprite, int x, int y, BlitterMode mode,
|
||||
*/
|
||||
void LoadStringWidthTable(FontSizes fontsizes)
|
||||
{
|
||||
ClearFontCache(fontsizes);
|
||||
FontCache::ClearFontCaches(fontsizes);
|
||||
|
||||
for (FontSize fs : fontsizes) {
|
||||
for (uint i = 0; i != 224; i++) {
|
||||
@@ -1820,7 +1820,7 @@ bool AdjustGUIZoom(bool automatic)
|
||||
if (old_font_zoom != _font_zoom) {
|
||||
GfxClearFontSpriteCache();
|
||||
}
|
||||
ClearFontCache(FONTSIZES_ALL);
|
||||
FontCache::ClearFontCaches(FONTSIZES_ALL);
|
||||
LoadStringWidthTable();
|
||||
|
||||
SetupWidgetDimensions();
|
||||
|
||||
Reference in New Issue
Block a user