aboutsummaryrefslogtreecommitdiff
path: root/graphics/fontman.h
diff options
context:
space:
mode:
authorJohannes Schickel2012-01-07 01:00:31 +0100
committerJohannes Schickel2012-01-07 01:03:07 +0100
commit050b8e33604bb50d48a9a43f61c85baccb17ab1d (patch)
treec4bea936ebe8425f91ecc80cdcd9fc34b103f712 /graphics/fontman.h
parent0d3e79cf77af364063944b5884c34c9da7c0466d (diff)
downloadscummvm-rg350-050b8e33604bb50d48a9a43f61c85baccb17ab1d.tar.gz
scummvm-rg350-050b8e33604bb50d48a9a43f61c85baccb17ab1d.tar.bz2
scummvm-rg350-050b8e33604bb50d48a9a43f61c85baccb17ab1d.zip
GUI: Rework how the default localized font is managed.
Now we set the default localized font to the "text_default" font of the currently active theme and default to the big GUI font in case none is specified properly.
Diffstat (limited to 'graphics/fontman.h')
-rw-r--r--graphics/fontman.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/graphics/fontman.h b/graphics/fontman.h
index 77ae508c16..e229860f24 100644
--- a/graphics/fontman.h
+++ b/graphics/fontman.h
@@ -43,6 +43,14 @@ public:
};
/**
+ * Sets the localized font name.
+ *
+ * @param name the name of the localized font.
+ * @return true when the font was present, false otherwise.
+ */
+ bool setLocalizedFont(const Common::String &name);
+
+ /**
* Retrieve a font object based on its 'name'.
*
* @param name the name of the font to be retrieved.
@@ -96,22 +104,13 @@ public:
//const Font *getFontBySize(int size???) const;
-protected:
- /**
- * Get the name of the localized font for the given usage. There is no garanty that
- * the font exists. If the usage is kLocalizedFont it returns an empty string.
- *
- * @param usage a FontUsage enum value indicating what the font will be used for.
- * @return the name of a localized font or an empty string if no suitable font was found.
- */
- Common::String getLocalizedFontNameByUsage(FontUsage usage) const;
-
private:
friend class Common::Singleton<SingletonBaseType>;
FontManager();
~FontManager();
Common::HashMap<Common::String, const Font *> _fontMap;
+ Common::String _localizedFontName;
};