#include <CFont.h>
Public Member Functions | |
| 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. | |
| cFont () | |
| Constructor. | |
| virtual | ~cFont () |
| Destructor. | |
| 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. | |
Specific implementations can be found later in this file.
| cFont::cFont | ( | ) |
Constructor.
Default constructor for abstract class cFont
| cFont * cFont::createFont | ( | ) | [static] |
Use this to obtain an actual, non-virtual font object.
Use this to obtain an actual, non-virtual font object
Use this to copy data from an existing font object.
Use this to copy data from an existing font object
| 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 |
| 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. |
1.5.2