diff options
author | Eugene Sandulenko | 2017-01-28 11:40:45 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2017-01-28 11:40:45 +0100 |
commit | 1f721e929fdec3b5f6d90dbece6b3112fab4c681 (patch) | |
tree | 3abd270ebae9c8dbf8c9a32d1e9ac9975150bb74 /graphics/macgui | |
parent | 61ffb6f55361a1343ecab71f203226448a5be207 (diff) | |
download | scummvm-rg350-1f721e929fdec3b5f6d90dbece6b3112fab4c681.tar.gz scummvm-rg350-1f721e929fdec3b5f6d90dbece6b3112fab4c681.tar.bz2 scummvm-rg350-1f721e929fdec3b5f6d90dbece6b3112fab4c681.zip |
GRAPHICS: Implemented MacFont fallback
Diffstat (limited to 'graphics/macgui')
-rw-r--r-- | graphics/macgui/macfontmanager.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/graphics/macgui/macfontmanager.cpp b/graphics/macgui/macfontmanager.cpp index 08b225a789..cf7ec4094e 100644 --- a/graphics/macgui/macfontmanager.cpp +++ b/graphics/macgui/macfontmanager.cpp @@ -290,12 +290,14 @@ const char *MacFontManager::getFontName(int id, int size, int slant) { static char name[128]; Common::String n; - if (_extraFontNames.contains(id)) + if (_extraFontNames.contains(id)) { n = _extraFontNames[id]; - else if (id < ARRAYSIZE(fontNames)) + } else if (id < ARRAYSIZE(fontNames)) { n = fontNames[id]; - else - return NULL; + } else { + warning("MacFontManager: Requested font ID %d not found. Falling back to Chicago", id); + n = fontNames[0]; // Fallback to Chicago + } snprintf(name, 128, "%s-%d-%d", n.c_str(), slant, size); |