From c47c9eaad49974a5dbb59b611dea53f44714d508 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 24 Dec 2019 16:28:02 +0100 Subject: GRAPHICS: MACGUI: Improved fallback processing for mac font families --- graphics/macgui/macfontmanager.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'graphics') diff --git a/graphics/macgui/macfontmanager.cpp b/graphics/macgui/macfontmanager.cpp index 8c35220e31..e8e3d4314b 100644 --- a/graphics/macgui/macfontmanager.cpp +++ b/graphics/macgui/macfontmanager.cpp @@ -346,10 +346,13 @@ const Common::String MacFontManager::getFontName(int id, int size, int slant, bo if (_extraFontNames.contains(id)) { n = _extraFontNames[id]; } else if (id < ARRAYSIZE(fontNames)) { - n = fontNames[id]; - } else { - warning("MacFontManager: Requested font ID %d not found. Falling back to Chicago", id); - n = fontNames[0]; // Fallback to Chicago + if (fontNames[id]) + n = fontNames[id]; + } + + if (n.empty()) { + warning("MacFontManager: Requested font ID %d not found. Falling back to Geneva", id); + n = fontNames[1]; // Fallback to Geneva } if (tryGen && slant != kMacFontRegular) { -- cgit v1.2.3