summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--data/branding.xml2
-rw-r--r--src/configuration.h1
-rw-r--r--src/gui/gui.cpp6
4 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 33c05b0b..9fa6981a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-17 Philipp Sehmisch <tmw@crushnet.org>
+
+ * data/branding.xml, src/configuration.h, src/gui/gui.cpp: Added the
+ font file to branding.xml (patch by Seeseekey)
+
2008-11-13 David Athay <ko2fan@gmail.com>
* src/gui/widgets/avatar.cpp, src/gui/widgets/avatar.h,
diff --git a/data/branding.xml b/data/branding.xml
index c07d0c56..ea3ee467 100644
--- a/data/branding.xml
+++ b/data/branding.xml
@@ -18,5 +18,7 @@ for their forks.
<option name="defaultServer" value="server.themanaworld.org"/>
<option name="defaultPort" value="9601"/>
<option name="defaultUpdateHost" value="http://updates.themanaworld.org"/>
+ <option name="guiFont" value="fonts/dejavusans.ttf" />
+ <option name="speechFont" value="fonts/dejavusans.ttf" />
</configuration>
diff --git a/src/configuration.h b/src/configuration.h
index a2d3b55d..72ae866c 100644
--- a/src/configuration.h
+++ b/src/configuration.h
@@ -105,6 +105,7 @@ class Configuration
std::string mConfigPath; /**< Location of config file */
};
+extern Configuration branding;
extern Configuration config;
#endif
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 6803be65..930d4939 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -103,14 +103,16 @@ Gui::Gui(Graphics *graphics):
ResourceManager *resman = ResourceManager::getInstance();
// Set global font
- std::string path = resman->getPath("fonts/dejavusans.ttf");
+ std::string path = resman->getPath(
+ branding.getValue("guiFont","fonts/dejavusans.ttf"));
if (!path.empty())
{
mGuiFont = new TrueTypeFont(path.c_str(), 11);
}
// Set speech font
- path = resman->getPath("fonts/dejavusans.ttf");
+ path = resman->getPath(
+ branding.getValue("speechFont","fonts/dejavusans.ttf"));
if (!path.empty())
{
speechFont = new TrueTypeFont(path.c_str(), 11);