diff --git a/src/gfx.cpp b/src/gfx.cpp index 5a30964c3a..fc9d1455cd 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -2185,6 +2185,8 @@ void UpdateGUIZoom() _gui_zoom = static_cast(_gui_zoom_cfg); } + ZoomLevel old_font_zoom = _font_zoom; + /* Determine real font zoom to use. */ if (_font_zoom_cfg == ZOOM_LVL_CFG_AUTO) { _font_zoom = static_cast(VideoDriver::GetInstance()->GetSuggestedUIZoom()); @@ -2192,6 +2194,10 @@ void UpdateGUIZoom() _font_zoom = static_cast(_font_zoom_cfg); } + if (old_font_zoom != _font_zoom) { + ClearFontCache(); + } + UpdateFontHeightCache(); } diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index fc31a8303a..7dc7f9ec70 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -580,7 +580,6 @@ struct GameOptionsWindow : Window { GfxClearSpriteCache(); _font_zoom_cfg = new_zoom; UpdateGUIZoom(); - ClearFontCache(); LoadStringWidthTable(); UpdateAllVirtCoords(); ReInitAllWindows(true);