This object class loads fonts from .ttf and .otf files, converting them into sprite images.
More...
|
|
| CGlyphFont (const char *fontName, float sizePt) |
|
void | setFont (const char *fontName, float sizePt) |
|
const char * | getFontName () |
| virtual SModuleOffset * | getCharacterModule (wchar_t character) |
| virtual void | getListModule (const wchar_t *string, std::vector< int > &format, std::vector< SModuleOffset * > &output, std::vector< int > &outputFormat) |
| virtual void | updateFontTexture () |
|
std::vector< SImage * > & | getImages () |
|
bool | load (const char *fileName) |
|
std::vector< SFrame * > & | getFrames () |
|
SFrame * | getFrameByName (const char *name) |
|
SFrame * | getFrameById (const char *id) |
|
const char * | getId () |
|
const char * | getPath () |
|
virtual bool | dropFont () |
|
virtual void | grabFont () |
This object class loads fonts from .ttf and .otf files, converting them into sprite images.
To load the font file, you'll require assistance from the CGlyphFreetype object class. Then, use the CGraphics2D object to draw text with the font.
freetypeFont->initFont("Segoe UI Light", "BuiltIn/Fonts/segoeui/segoeuil.ttf");
CGlyphFont* font = new CGlyphFont();
font->setFont("Segoe UI Light", 25);
Definition CGlyphFreetype.h:83