aboutsummaryrefslogtreecommitdiff
path: root/graphics/macgui
diff options
context:
space:
mode:
authorEugene Sandulenko2019-12-24 16:28:02 +0100
committerEugene Sandulenko2019-12-24 16:28:02 +0100
commitc47c9eaad49974a5dbb59b611dea53f44714d508 (patch)
treeb3981de15871b0dd31cd315da3282fb3493a90c3 /graphics/macgui
parent3b6d582988f46aa312c975ecd7206338c6f85208 (diff)
downloadscummvm-rg350-c47c9eaad49974a5dbb59b611dea53f44714d508.tar.gz
scummvm-rg350-c47c9eaad49974a5dbb59b611dea53f44714d508.tar.bz2
scummvm-rg350-c47c9eaad49974a5dbb59b611dea53f44714d508.zip
GRAPHICS: MACGUI: Improved fallback processing for mac font families
Diffstat (limited to 'graphics/macgui')
-rw-r--r--graphics/macgui/macfontmanager.cpp11
1 files changed, 7 insertions, 4 deletions
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) {