![]() |
CRM64Pro GDK v0.17.0
A free cross-platform game development kit built on top of SDL 3.0
|
Font Manager class.
Public Member Functions | |
| Font * | get (const string &sName) |
| Get a pointer to the font using its name. | |
| bool | info (Sint32 iMode=0) override |
| Request Font Manager information. | |
| Sint32 | create (const string &sName, Uint32 iVersion=10) override |
| Create a new font. | |
| bool | close (Sint32 idFont) override |
| Close and destroy a font. | |
| Sint32 | getCount () const override |
| Get number of loaded objects. | |
| Sint32 | setName (Sint32 idFont, const string &sName) override |
| Change the object name. | |
| Font * | get (Sint32 idFont) |
| Get a pointer to the font using its handler. | |
| Sint32 | getBuiltin (const string &sName) |
| Get a built-in embedded font id using its name. | |
| Sint32 | child (Sint32 idFont) |
| Create a child font dependant on the provided one (the parent). | |
| Sint32 | load (const string &sCDCFile, const string &sName) |
| Load a font stored in a CDC file. | |
| Sint32 | load (const Sint32 idCDC, const string &sName) |
| Load a font stored in a CDC file. | |
| Sint32 | loadFromBuffer (const void *pBuffer, Sint32 iSize, const string &sName) |
| Load a font from an image memory buffer. | |
| Sint32 | remove (const Sint32 idCDC, const string &sName) |
| Remove a font stored in a CDC file. | |
| bool | exist (const Sint32 idCDC, const string &sName) |
| Check if a font is stored in a CDC file. | |
| bool | exist (const string &sCDCFile, const string &sName) |
| Check if a font is stored in a CDC file. | |
| Font * CRM64Pro::FontMgr::get | ( | const string & | sName | ) |
Get a pointer to the font using its name.
| sName | Font name. |
|
override |
Request Font Manager information.
Writes information to the default log.
| iMode | -1 for displaying only Manager information. 0 for displaying Manager and all Objects information. This is the default value. Greater than 0 (Font id) for displaying Manager and given Font information. |
|
override |
Create a new font.
This method will create an empty font (no image assigned), use Font::assignImage() method for assigning the image.
| sName | The name to give to the font e.g. 'myFont'. The object name must be unique and with a maximum size of 64 characters or will be truncated. |
| iVersion | Font version. 10 means 1.0 which is the only version supported (as of now). v1.0 is set by default. |
|
override |
Close and destroy a font.
| idFont | 0 for closing all fonts or the Font id. Stand-alone and child fonts can be closed but parent ones, can not as they have at least one dependency (a child). |
|
override |
Get number of loaded objects.
|
override |
Change the object name.
| idFont | Font id. |
| sName | The name to give to the font e.g. 'myFont'. The object name must be unique and with a maximum size of 64 characters or will be truncated. |
| Font * CRM64Pro::FontMgr::get | ( | Sint32 | idFont | ) |
Get a pointer to the font using its handler.
| idFont | Font id. |
| Sint32 CRM64Pro::FontMgr::getBuiltin | ( | const string & | sName | ) |
Get a built-in embedded font id using its name.
Supported names are:
| sName | Embedded font short name. |
| Sint32 CRM64Pro::FontMgr::child | ( | Sint32 | idFont | ) |
Create a child font dependant on the provided one (the parent).
A child font uses the attributes of the parent and creates also a parent child image for having different attributes.
| idFont | Parent Font id. If the provided font is a child, internally it will redirect this request to the parent in order to create the new child. |
| Sint32 CRM64Pro::FontMgr::load | ( | const string & | sCDCFile, |
| const string & | sName ) |
Load a font stored in a CDC file.
| sCDCFile | String containing the [directory]+filename. Directory separators '\' and '/' are supported. |
| sName | String with the font name (maximum size of 64 characters). If the font is already created, this method will call child() for creating a child. |
| Sint32 CRM64Pro::FontMgr::load | ( | const Sint32 | idCDC, |
| const string & | sName ) |
| Sint32 CRM64Pro::FontMgr::loadFromBuffer | ( | const void * | pBuffer, |
| Sint32 | iSize, | ||
| const string & | sName ) |
Load a font from an image memory buffer.
| pBuffer | Pointer to the memory buffer containing the image (BMP or PNG) with transparency enabled. |
| iSize | Size of the buffer in bytes. |
| sName | string with the font name (max 64 characters). |
| Sint32 CRM64Pro::FontMgr::remove | ( | const Sint32 | idCDC, |
| const string & | sName ) |
Remove a font stored in a CDC file.
| idCDC | CDC id. |
| sName | String with the font name (maximum size of 64 characters). |
| bool CRM64Pro::FontMgr::exist | ( | const Sint32 | idCDC, |
| const string & | sName ) |
Check if a font is stored in a CDC file.
| idCDC | CDC id. |
| sName | string with the font name (maximum size of 64 characters). |
| bool CRM64Pro::FontMgr::exist | ( | const string & | sCDCFile, |
| const string & | sName ) |
Check if a font is stored in a CDC file.
| sCDCFile | Path to the CDC archive file. |
| sName | string with the font name (maximum size of 64 characters). |