From 243497fdab7c2f88bebb0e469ecbb2f1fbbe350d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 31 May 2011 21:46:58 +0300 Subject: Add secure font. Now unused. --- src/gui/gui.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/gui/gui.cpp') 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(); -- cgit v1.2.3-60-g2f50