From a928798a9326de1e6781e14c8ccf5abec1232385 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sat, 24 Jan 2009 19:43:26 +0100 Subject: Use standard GUI font also for speech and names The speech bitmap font can't handle unicode, so it has now been replaced by the standard GUI font, drawn with a shadow for chat and with a full outline for names. --- src/gui/gui.cpp | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) (limited to 'src/gui/gui.cpp') diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 722779ca..22d94791 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -43,16 +43,14 @@ #include "../resources/imageloader.h" // Guichan stuff -Gui *gui; -Viewport *viewport; /**< Viewport on the map. */ -SDLInput *guiInput; +Gui *gui = 0; +Viewport *viewport = 0; /**< Viewport on the map. */ +SDLInput *guiInput = 0; // Fonts used in showing hits -gcn::Font *hitRedFont; -gcn::Font *hitBlueFont; -gcn::Font *hitYellowFont; -// Font used to display speech and player names -gcn::Font *speechFont; +gcn::Font *hitRedFont = 0; +gcn::Font *hitBlueFont = 0; +gcn::Font *hitYellowFont = 0; class GuiConfigListener : public ConfigListener { @@ -116,20 +114,6 @@ Gui::Gui(Graphics *graphics): + e.getMessage()); } - // Set speech font - try { - speechFont = new gcn::ImageFont("graphics/gui/rpgfont_wider.png", - " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" - "0123456789.,!?-+/():;%&`'*#=[]\"<>{}^~|_@$\\" - "áÁéÉíÍóÓúÚç륣¢¡¿àãõêñÑöüäÖÜÄßøèÈåÅ" - ); - } - catch (gcn::Exception e) - { - logger->error(std::string("Unable to load rpgfont_wider.png: ") - + e.getMessage()); - } - gcn::Widget::setGlobalFont(mGuiFont); // Load hits' colourful fonts @@ -173,7 +157,6 @@ Gui::~Gui() mMouseCursors->decRef(); delete mGuiFont; - delete speechFont; delete viewport; delete getTop(); -- cgit v1.2.3-70-g09d2