#include <CFont.h>
Public Member Functions | |
cWin32BitmapFont () | |
Constructor of cWin32BitmapFont. | |
virtual | ~cWin32BitmapFont () |
Destructor of cWin32BitmapFont. | |
virtual int | renderString (const char *a_str) |
virtual void | setFontFace (const char *a_faceName) |
Change the Font face; may require re-initializing the Font. | |
virtual void | setPointSize (const float &a_pointSize) |
Change the Font size; may require re-initializing the Font. | |
virtual LOGFONT * | getLogFont () |
virtual int | getCharacterWidth (const unsigned char &a_char) |
Get the width of a particular character. | |
Public Attributes | |
bool | m_solidFont |
Protected Member Functions | |
int | initialize () |
Should be called with an active rendering context; returns 0 for success, -1 for error. | |
int | uninitialize () |
Clean up. | |
Protected Attributes | |
int | m_bitmap_font_base |
The base openGL display list used for our Font, or -1 if we're uninitialized. | |
LOGFONT | m_logfont |
Information about the actual win32 Font. | |
float | m_outlineFontDeviation |
Parameter relevant to outline Fonts only. | |
float | m_outlineFontExtrusion |
Parameter relevant to outline Fonts only. | |
bool | m_usePolygonsForOutlineFonts |
Parameter relevant to outline Fonts only. |
cWin32BitmapFont::cWin32BitmapFont | ( | ) |
Constructor of cWin32BitmapFont.
Constructor for cWin32BitmapFont.
cWin32BitmapFont::~cWin32BitmapFont | ( | ) | [virtual] |
Destructor of cWin32BitmapFont.
Destructor for cWin32BitmapFont.
int cWin32BitmapFont::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 from cFont.
virtual LOGFONT* cWin32BitmapFont::getLogFont | ( | ) | [inline, virtual] |
Used to access win32 font information directly; use with care and be aware that the font may need reinitialization if you modify options _after_ the font is used for rendering.
int cWin32BitmapFont::initialize | ( | ) | [protected] |
Should be called with an active rendering context; returns 0 for success, -1 for error.
Initialize the internal font representation
int cWin32BitmapFont::renderString | ( | const char * | a_str | ) | [virtual] |
Renders a string, optionally a string w/embedded printf specifiers.
Returns 0 for success, -1 for error.
Renders an actual string of text, initializing the font if necessary.
a_str | The string to render; should not include newlines. |
Implements cFont.
void cWin32BitmapFont::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 from cFont.
void cWin32BitmapFont::setPointSize | ( | const float & | a_pointSize | ) | [virtual] |
Change the Font size; may require re-initializing the Font.
Change the font size, possibly marking the font for re-initialization.
a_pointSize | The new font size. |
Reimplemented from cFont.
int cWin32BitmapFont::uninitialize | ( | ) | [protected] |
Clean up.
Clean up a win32 bitmapped font
If you want an outline Font instead of a solid font, set this to false before using the Font for rendering.