summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index a23da8157..6651a01d5 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -169,6 +169,21 @@ Gui::Gui(Graphics *graphics):
std::string("': ") + e.getMessage());
}
+ // Set secure font
+ fontFile = config.getValue("secureFont", "");
+ if (fontFile.empty())
+ fontFile = branding.getStringValue("secureFont");
+
+ try
+ {
+ mSecureFont = new SDLFont(fontFile, fontSize);
+ }
+ catch (const gcn::Exception &e)
+ {
+ logger->error(std::string("Unable to load '") + fontFile +
+ std::string("': ") + e.getMessage());
+ }
+
gcn::Widget::setGlobalFont(mGuiFont);
// Initialize mouse cursor and listen for changes to the option
@@ -195,6 +210,8 @@ Gui::~Gui()
boldFont = 0;
delete mHelpFont;
mHelpFont = 0;
+ delete mSecureFont;
+ mSecureFont = 0;
delete mInfoParticleFont;
mInfoParticleFont = 0;
delete getTop();