summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-01-06 22:56:43 +0100
committerIra Rice <irarice@gmail.com>2009-01-06 15:18:53 -0700
commitbd28cda98c51df0ef09ebaa638db43788e1855c5 (patch)
tree308e4d0f70bf16eb3e78cccb72fe3cdf672bb1d9 /src/gui/gui.cpp
parentf4a0cc34922e7c94e4bc2fce80fa6ab748854e58 (diff)
downloadmana-client-bd28cda98c51df0ef09ebaa638db43788e1855c5.tar.gz
mana-client-bd28cda98c51df0ef09ebaa638db43788e1855c5.tar.bz2
mana-client-bd28cda98c51df0ef09ebaa638db43788e1855c5.tar.xz
mana-client-bd28cda98c51df0ef09ebaa638db43788e1855c5.zip
Fixed the true type font to render unicode now
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 7cf1881c..6a399548 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -22,7 +22,6 @@
#include <guichan/exception.hpp>
#include <guichan/image.hpp>
#include <guichan/imagefont.hpp>
-#include <SDL/SDL_ttf.h>
#include "focushandler.h"
#include "gui.h"
@@ -45,7 +44,7 @@
// Guichan stuff
Gui *gui;
Viewport *viewport; /**< Viewport on the map. */
-SDLInput *guiInput; /**< GUI input. */
+SDLInput *guiInput;
// Fonts used in showing hits
gcn::Font *hitRedFont;
@@ -110,20 +109,17 @@ Gui::Gui(Graphics *graphics):
Window::setWindowContainer(guiTop);
setTop(guiTop);
+ ResourceManager *resman = ResourceManager::getInstance();
+
// Set global font
+ std::string path = resman->getPath("fonts/dejavusans.ttf");
try {
- mGuiFont = new TrueTypeFont("/usr/local/share/aethyra/data/fonts/dejavusans.ttf", 10);
+ mGuiFont = new TrueTypeFont(path, 11);
}
catch (gcn::Exception e)
{
- try {
- mGuiFont = new TrueTypeFont("data/fonts/dejavusans.ttf", 10);
- }
- catch (gcn::Exception e)
- {
logger->error(std::string("Unable to load dejavusans.ttf: ")
+ e.getMessage());
- }
}
// Set speech font