aboutsummaryrefslogtreecommitdiff
path: root/graphics/fontman.cpp
diff options
context:
space:
mode:
authorThierry Crozat2011-05-22 15:15:15 +0100
committerThierry Crozat2011-06-06 23:20:08 +0100
commit592cca5402f9162fc70b48f40b95faec44341bd0 (patch)
tree3c4f654a16552f74faabb3de8466250ca1ed1170 /graphics/fontman.cpp
parent72080d8972169879416f64a432f4b666207af3f9 (diff)
downloadscummvm-rg350-592cca5402f9162fc70b48f40b95faec44341bd0.tar.gz
scummvm-rg350-592cca5402f9162fc70b48f40b95faec44341bd0.tar.bz2
scummvm-rg350-592cca5402f9162fc70b48f40b95faec44341bd0.zip
GRAPHICS: Get rid of kSODFont (ScummFont)
OSD is now using the kGUIFont instead. The main advantage is that the kGUIFont can be used for translated text while only ASCII characters were present in ScummFont.
Diffstat (limited to 'graphics/fontman.cpp')
-rw-r--r--graphics/fontman.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/graphics/fontman.cpp b/graphics/fontman.cpp
index f937e55b69..08f2ce990b 100644
--- a/graphics/fontman.cpp
+++ b/graphics/fontman.cpp
@@ -26,7 +26,6 @@ DECLARE_SINGLETON(Graphics::FontManager);
namespace Graphics {
-const ScummFont *g_scummfont = 0;
FORWARD_DECLARE_FONT(g_sysfont);
FORWARD_DECLARE_FONT(g_sysfont_big);
FORWARD_DECLARE_FONT(g_consolefont);
@@ -34,18 +33,15 @@ FORWARD_DECLARE_FONT(g_consolefont);
FontManager::FontManager() {
// This assert should *never* trigger, because
// FontManager is a singleton, thus there is only
- // one instance of it per time. (g_scummfont gets
+ // one instance of it per time. (g_sysfont gets
// reset to 0 in the desctructor of this class).
- assert(g_scummfont == 0);
- g_scummfont = new ScummFont;
+ assert(g_sysfont == 0);
INIT_FONT(g_sysfont);
INIT_FONT(g_sysfont_big);
INIT_FONT(g_consolefont);
}
FontManager::~FontManager() {
- delete g_scummfont;
- g_scummfont = 0;
delete g_sysfont;
g_sysfont = 0;
delete g_sysfont_big;
@@ -58,7 +54,6 @@ const struct {
const char *name;
FontManager::FontUsage id;
} builtinFontNames[] = {
- { "builtinOSD", FontManager::kOSDFont },
{ "builtinConsole", FontManager::kConsoleFont },
{ "fixed5x8.bdf", FontManager::kConsoleFont },
{ "fixed5x8-iso-8859-1.bdf", FontManager::kConsoleFont },
@@ -69,7 +64,7 @@ const struct {
{ "helvB12.bdf", FontManager::kBigGUIFont },
{ "helvB12-iso-8859-1.bdf", FontManager::kBigGUIFont },
{ "helvB12-ascii.bdf", FontManager::kBigGUIFont },
- { 0, FontManager::kOSDFont }
+ { 0, FontManager::kConsoleFont }
};
const Font *FontManager::getFontByName(const Common::String &name) const {
@@ -84,8 +79,6 @@ const Font *FontManager::getFontByName(const Common::String &name) const {
const Font *FontManager::getFontByUsage(FontUsage usage) const {
switch (usage) {
- case kOSDFont:
- return g_scummfont;
case kConsoleFont:
return g_consolefont;
case kGUIFont: