Manages fonts.
More...
#include <CSMAPI_types.h>
|
|
| FontManager (const char *font_name, FontObject *fo, int width, int height) |
| |
|
|
char | mFontName [127] |
| | The name of this font.
|
| |
|
FontObject * | mFont |
| | The font object tied to this manager.
|
| |
|
int | mUserCount |
| | How many users this font has If 0, it will be freed.
|
| |
|
int | mWidth |
| | Font width.
|
| |
|
int | mHeight |
| | Font height.
|
| |
|
| static FontObject * | LoadFont (const char *font_name, int font_width, int font_height, bool bDoNotUse=false, VideoTexture *pTexture=NULL, FontManager **resultingManager=NULL, unsigned int iMagnification=0xFFFFFFFF) |
| | Load a font by name & size. More...
|
| |
| static void | UnloadFont (FontObject *fo) |
| | Unload a font object. More...
|
| |
◆ DestroyRendererTextures()
| static void FontManager::DestroyRendererTextures |
( |
void * |
pTarget | ) |
|
|
static |
Destroy all textures related to the given renderer.
- Parameters
-
| pTarget | The target renderer. |
◆ GetManagerForFont()
| static FontManager* FontManager::GetManagerForFont |
( |
FontObject * |
fo | ) |
|
|
static |
Fetch the font manager for a font object.
- Parameters
-
| fo | The font object to check. |
- Returns
- Returns the FontManager on success, NULL otherwise.
◆ LinkFontToTexture()
| static void FontManager::LinkFontToTexture |
( |
FontObject * |
fo, |
|
|
VideoTexture * |
pTexture |
|
) |
| |
|
static |
Link a font to a texture.
- Parameters
-
| fo | The font object to link. |
| pTexture | The texture that the fontobject should be linked to. |
◆ LoadFont()
| static FontObject* FontManager::LoadFont |
( |
const char * |
font_name, |
|
|
int |
font_width, |
|
|
int |
font_height, |
|
|
bool |
bDoNotUse = false, |
|
|
VideoTexture * |
pTexture = NULL, |
|
|
FontManager ** |
resultingManager = NULL, |
|
|
unsigned int |
iMagnification = 0xFFFFFFFF |
|
) |
| |
|
staticprotected |
Load a font by name & size.
- Parameters
-
| font_name | The name of the font. |
| font_width | The width of the font. |
| font_height | The height of the font. |
| bDoNotuse | Don't increment this font's ref value (unless it wasn't previously cached). DO NOT USE THIS UNLESS YOU KNOW WHAT YOU'RE DOING. |
| pTexture | The texture this font belongs to. |
| resultingManager | A pointer to a FontManager* variable to hold the resulting font manager for this font. |
| iMagnification | The magnification size of the font. |
- Returns
- Returns a FontObject* on success, NULL on failure.
- Examples
- RenderPipeline.cpp, and WelcomeMode.cpp.
◆ UnloadFont()
| static void FontManager::UnloadFont |
( |
FontObject * |
fo | ) |
|
|
staticprotected |
◆ UseFont()
| static void FontManager::UseFont |
( |
FontObject * |
pFont | ) |
|
|
static |
Increment the use count for a font.
- Parameters
-
The documentation for this class was generated from the following file: