From 05f21d45ee865cb90b67e091fc269801c900248c Mon Sep 17 00:00:00 2001 From: auria Date: Sun, 24 Jan 2010 00:26:41 +0000 Subject: [PATCH] Moved fonts to the (duh) /fonts directory in /data git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4524 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- data/{gui => fonts}/LayneHansom.xml | Bin data/{gui => fonts}/LayneHansom0.png | Bin data/{gui => fonts}/title_font.png | Bin data/{gui => fonts}/title_font.xml | Bin data/{gui => fonts}/title_font_2.png | Bin src/guiengine/CGUIFont.cpp | 3 ++- src/guiengine/engine.cpp | 4 ++-- 7 files changed, 4 insertions(+), 3 deletions(-) rename data/{gui => fonts}/LayneHansom.xml (100%) rename data/{gui => fonts}/LayneHansom0.png (100%) rename data/{gui => fonts}/title_font.png (100%) rename data/{gui => fonts}/title_font.xml (100%) rename data/{gui => fonts}/title_font_2.png (100%) diff --git a/data/gui/LayneHansom.xml b/data/fonts/LayneHansom.xml similarity index 100% rename from data/gui/LayneHansom.xml rename to data/fonts/LayneHansom.xml diff --git a/data/gui/LayneHansom0.png b/data/fonts/LayneHansom0.png similarity index 100% rename from data/gui/LayneHansom0.png rename to data/fonts/LayneHansom0.png diff --git a/data/gui/title_font.png b/data/fonts/title_font.png similarity index 100% rename from data/gui/title_font.png rename to data/fonts/title_font.png diff --git a/data/gui/title_font.xml b/data/fonts/title_font.xml similarity index 100% rename from data/gui/title_font.xml rename to data/fonts/title_font.xml diff --git a/data/gui/title_font_2.png b/data/fonts/title_font_2.png similarity index 100% rename from data/gui/title_font_2.png rename to data/fonts/title_font_2.png diff --git a/src/guiengine/CGUIFont.cpp b/src/guiengine/CGUIFont.cpp index daf4832e8..1324dab4e 100644 --- a/src/guiengine/CGUIFont.cpp +++ b/src/guiengine/CGUIFont.cpp @@ -77,7 +77,8 @@ bool ScalableFont::load(io::IXMLReader* xml) if (core::stringw(L"Texture") == xml->getNodeName()) { // add a texture - core::stringc fn = core::stringc((file_manager->getGUIDir() + "/").c_str()) + xml->getAttributeValue(L"filename"); + core::stringc filename = xml->getAttributeValue(L"filename"); + core::stringc fn = file_manager->getFontFile(filename.c_str()).c_str(); u32 i = (u32)xml->getAttributeValueAsInt(L"index"); core::stringw alpha = xml->getAttributeValue(L"hasAlpha"); diff --git a/src/guiengine/engine.cpp b/src/guiengine/engine.cpp index ce4403640..a453266cf 100644 --- a/src/guiengine/engine.cpp +++ b/src/guiengine/engine.cpp @@ -205,12 +205,12 @@ void init(IrrlichtDevice* device_a, IVideoDriver* driver_a, AbstractStateManager const float title_text_scale = 0.2f + 0.2f*std::max(0, screen_width - 640)/564.0f; //ScalableFont* sfont = new ScalableFont(g_env, (file_manager->getGUIDir() + "/okolaks.xml").c_str()); - ScalableFont* sfont = new ScalableFont(g_env, (file_manager->getGUIDir() + "/LayneHansom.xml").c_str()); + ScalableFont* sfont = new ScalableFont(g_env, file_manager->getFontFile("LayneHansom.xml").c_str() ); sfont->setScale(normal_text_scale); sfont->setKerningHeight(-5); g_font = sfont; - ScalableFont* sfont2 = new ScalableFont(g_env, (file_manager->getGUIDir() + "/title_font.xml").c_str()); + ScalableFont* sfont2 = new ScalableFont(g_env, file_manager->getFontFile("title_font.xml").c_str() ); sfont2->setScale(title_text_scale); sfont2->setKerningWidth(-18); g_title_font = sfont2;