aboutsummaryrefslogtreecommitdiff
path: root/gui/ThemeEngine.cpp
diff options
context:
space:
mode:
authorBastien Bouclet2019-01-22 13:07:15 +0100
committerBastien Bouclet2019-01-22 13:07:15 +0100
commitc59dd85ebc42b2133ff98bc9411313a1466f1334 (patch)
tree187858dea3152a7f87b7c939523475ee487cb0f5 /gui/ThemeEngine.cpp
parent364a2aa0fbe1c6640fdaeb15cfd7cc66fd9e4a42 (diff)
downloadscummvm-rg350-c59dd85ebc42b2133ff98bc9411313a1466f1334.tar.gz
scummvm-rg350-c59dd85ebc42b2133ff98bc9411313a1466f1334.tar.bz2
scummvm-rg350-c59dd85ebc42b2133ff98bc9411313a1466f1334.zip
GUI: Don't try loading TTF fonts for themes that don't request one
Diffstat (limited to 'gui/ThemeEngine.cpp')
-rw-r--r--gui/ThemeEngine.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index 4e91768711..e57a1ef687 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -1541,7 +1541,9 @@ const Graphics::Font *ThemeEngine::loadFont(const Common::String &filename, cons
const Graphics::Font *font = 0;
// Prefer scalable fonts over non-scalable fonts
- font = loadScalableFont(scalableFilename, charset, pointsize, fontName);
+ if (!scalableFilename.empty())
+ font = loadScalableFont(scalableFilename, charset, pointsize, fontName);
+
if (!font)
font = loadFont(filename, fontName);