#include <OpenGUI_FontManager.h>
Public Types | |
| typedef std::list< std::string > | FontList |
| a list of font names that are currently loaded in the FontManager, retrieved by FontManager::getFontList() | |
Public Member Functions | |
| FontSetPtr | RegisterFontSet (std::string filename, std::string fontName) |
| Registers a new font. | |
| void | SetDefaultFont (Font font) |
| Sets the default font. | |
| Font | GetDefaultFont () |
| Retrieves the default font. | |
| void | UnRegisterFontSet (Font font) |
| UnRegisters a loaded font by handle. | |
| void | UnRegisterFontSet (const std::string &fontName) |
| UnRegisters a loaded font by name. | |
| void | UnRegisterFontSet (FontSetPtr fontSet) |
| UnRegisters a loaded font by FontSetPtr. | |
| FontSetPtr | GetFontSet (const std::string &fontName) |
| Retrieves a font by name. | |
| FontList | getFontList () |
| Returns a FontList containing the names of all loaded fonts, which can then be fed to GetFontSet() or used with Font. | |
| ImageryPtrList | _getFontAtlases () |
| Returns an ImageryPtrList containing ImageryPtrs for each font atlas. | |
Static Public Member Functions | |
| static FontManager & | getSingleton (void) |
| Retrieve the current singleton, if one exists. If none exists, this will cause an error. | |
| static FontManager * | getSingletonPtr (void) |
| Retrieve a pointer to the current singleton, if one exists. If none exists, this will return 0. | |
| typedef std::list<std::string> OpenGUI::FontManager::FontList |
a list of font names that are currently loaded in the FontManager, retrieved by FontManager::getFontList()
| ImageryPtrList OpenGUI::FontManager::_getFontAtlases | ( | ) |
Returns an ImageryPtrList containing ImageryPtrs for each font atlas.
This is a debugging tool, so you can retrieve and display font atlases in their raw form. The validity of the returned list is very short, and it can easily become invalidated by calls to render new font glyphs or by the loading and unloading of FontSets. The best course of action is to use the obtained information immediately, and re-request it each time you need it (especially between frames) as its contents could have changed.
| Font OpenGUI::FontManager::GetDefaultFont | ( | ) |
Retrieves the default font.
| FontManager::FontList OpenGUI::FontManager::getFontList | ( | ) |
Returns a FontList containing the names of all loaded fonts, which can then be fed to GetFontSet() or used with Font.
| FontSetPtr OpenGUI::FontManager::GetFontSet | ( | const std::string & | fontName | ) |
Retrieves a font by name.
| FontManager & OpenGUI::FontManager::getSingleton | ( | void | ) | [static] |
Retrieve the current singleton, if one exists. If none exists, this will cause an error.
| FontManager * OpenGUI::FontManager::getSingletonPtr | ( | void | ) | [static] |
Retrieve a pointer to the current singleton, if one exists. If none exists, this will return 0.
| FontSetPtr OpenGUI::FontManager::RegisterFontSet | ( | std::string | filename, | |
| std::string | fontName | |||
| ) |
Registers a new font.
If an existing font already exists with the same fontName, it will replaced by the new font. This will only affect newly created Font handles, and does not update the default font if the replaced font was also the default font.
SetDefaultFont(). | void OpenGUI::FontManager::SetDefaultFont | ( | Font | font | ) |
Sets the default font.
This sets the default font and font size (in points) that is used when no font is specified.
| void OpenGUI::FontManager::UnRegisterFontSet | ( | FontSetPtr | fontSet | ) |
UnRegisters a loaded font by FontSetPtr.
| void OpenGUI::FontManager::UnRegisterFontSet | ( | const std::string & | fontName | ) |
UnRegisters a loaded font by name.
| void OpenGUI::FontManager::UnRegisterFontSet | ( | Font | font | ) | [inline] |
UnRegisters a loaded font by handle.
This function will bind the given Font handle if it is not already bound.