#include <CFont.h>
Public Member Functions | |
cFont () | |
Constructor of cFont. | |
virtual | ~cFont () |
Destructor of cFont. | |
virtual int | renderString (const char *a_str)=0 |
Renders a single-line string. | |
virtual void | setFontFace (const char *a_faceName) |
Change the Font face; may require re-initializing the Font. | |
virtual void | getFontFace (char *a_faceName) const |
Get the current Font face. | |
virtual void | setPointSize (const float &a_pointSize) |
Change the Font size; may require re-initializing the font. | |
virtual float | getPointSize () const |
Get the current Font size. | |
virtual int | getCharacterWidth (const unsigned char &a_char) |
Get the width of a particular character. | |
Static Public Member Functions | |
static cFont * | createFont () |
Use this to obtain an actual, non-virtual Font object. | |
static cFont * | createFont (const cFont *oldFont) |
Use this to copy data from an existing Font object. | |
Protected Attributes | |
float | m_pointSize |
The point size of the Font. | |
char | m_fontFace [255] |
The Font face name. | |
int | m_char_widths [255] |
The width of each character in our Font. |
Use this to copy data from an existing Font object.
Use this to copy data from an existing font object.
cFont * cFont::createFont | ( | ) | [static] |
Use this to obtain an actual, non-virtual Font object.
Use this to obtain an actual, non-virtual font object.
int cFont::getCharacterWidth | ( | const unsigned char & | a_char | ) | [virtual] |
Get the width of a particular character.
Get the width of a particular character.
a_char | The character (e.g. 'a') to look up. Characters less than 32 ('A') will generate errors. |
Reimplemented in cGLUTBitmapFont, and cWin32BitmapFont.
void cFont::setFontFace | ( | const char * | a_faceName | ) | [virtual] |
Change the Font face; may require re-initializing the Font.
Change the font face, possibly marking the font for re-initialization.
a_faceName | The new face name |
Reimplemented in cWin32BitmapFont.