aboutsummaryrefslogtreecommitdiff
path: root/gui/ThemeEngine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/ThemeEngine.cpp')
-rw-r--r--gui/ThemeEngine.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index 73c1835c9e..cf16eec238 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -33,6 +33,7 @@
#include "graphics/imagedec.h"
#include "graphics/surface.h"
#include "graphics/VectorRenderer.h"
+#include "graphics/fonts/bdf.h"
#include "gui/widget.h"
#include "gui/ThemeEngine.h"
@@ -589,7 +590,7 @@ bool ThemeEngine::addFont(TextData textId, const Common::String &file) {
#ifdef USE_TRANSLATION
TransMan.setLanguage("C");
#endif
- warning("Failed to load localized font '%s'. Using non-localized font and default GUI language instead", file.c_str());
+ warning("Failed to load localized font '%s'. Using non-localized font and default GUI language instead", localized.c_str());
}
}
}
@@ -659,6 +660,8 @@ bool ThemeEngine::addDrawData(const Common::String &data, bool cached) {
void ThemeEngine::loadTheme(const Common::String &themeId) {
unloadTheme();
+ debug(6, "Loading theme %s", themeId.c_str());
+
if (themeId == "builtin") {
_themeOk = loadDefaultXML();
} else {
@@ -1394,7 +1397,7 @@ const Graphics::Font *ThemeEngine::loadFontFromArchive(const Common::String &fil
if (_themeArchive)
stream = _themeArchive->createReadStreamForMember(filename);
if (stream) {
- font = Graphics::NewFont::loadFont(*stream);
+ font = Graphics::BdfFont::loadFont(*stream);
delete stream;
}
@@ -1408,7 +1411,7 @@ const Graphics::Font *ThemeEngine::loadCachedFontFromArchive(const Common::Strin
if (_themeArchive)
stream = _themeArchive->createReadStreamForMember(filename);
if (stream) {
- font = Graphics::NewFont::loadFromCache(*stream);
+ font = Graphics::BdfFont::loadFromCache(*stream);
delete stream;
}
@@ -1422,7 +1425,7 @@ const Graphics::Font *ThemeEngine::loadFont(const Common::String &filename) {
if (!cacheFilename.empty()) {
if (fontFile.open(cacheFilename)) {
- font = Graphics::NewFont::loadFromCache(fontFile);
+ font = Graphics::BdfFont::loadFromCache(fontFile);
}
if (font)
@@ -1434,7 +1437,7 @@ const Graphics::Font *ThemeEngine::loadFont(const Common::String &filename) {
// normal open
if (fontFile.open(filename)) {
- font = Graphics::NewFont::loadFont(fontFile);
+ font = Graphics::BdfFont::loadFont(fontFile);
}
if (!font) {
@@ -1443,7 +1446,7 @@ const Graphics::Font *ThemeEngine::loadFont(const Common::String &filename) {
if (font) {
if (!cacheFilename.empty()) {
- if (!Graphics::NewFont::cacheFontData(*(const Graphics::NewFont *)font, cacheFilename)) {
+ if (!Graphics::BdfFont::cacheFontData(*(const Graphics::BdfFont *)font, cacheFilename)) {
warning("Couldn't create cache file for font '%s'", filename.c_str());
}
}