diff options
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r-- | src/gui/gui.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 2ef7aba3..db0d1905 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -107,24 +107,20 @@ Gui::Gui(Graphics *graphics): Window::setWindowContainer(guiTop); setTop(guiTop); + ResourceManager *resman = ResourceManager::getInstance(); + // Set global font - try { - mGuiFont = new TrueTypeFont("data/fonts/dejavusans.ttf", 11); - } - catch (gcn::Exception e) + std::string path = resman->getPath("fonts/dejavusans.ttf"); + if (path != "") { - logger->error(std::string("Unable to load dejavusans.ttf: ") + e.getMessage()); + mGuiFont = new TrueTypeFont(path.c_str(), 11); } // Set speech font - try - { - // FIXME: use another font? - speechFont = new TrueTypeFont("data/fonts/dejavusans.ttf", 11); - } - catch (gcn::Exception e) + path = resman->getPath("fonts/dejavusans.ttf"); + if (path != "") { - logger->error(std::string("Unable to load dejavusans.ttf: ") + e.getMessage()); + speechFont = new TrueTypeFont(path.c_str(), 11); } gcn::Widget::setGlobalFont(mGuiFont); |