#include <Font.h>
Public Member Functions | |
| Font () | |
| Standard Constructor. | |
| Font (const string &filename) | |
| Constructor. | |
| Font (const Font &source) | |
| Copy-constructor. | |
| ~Font () | |
| Destructor. | |
| string & | getFontname () |
| Gets texture filename. | |
| Texture * | getStandardTexture () |
| Gets standard styled font texture. | |
| Texture * | getBoldTexture () |
| Gets bold styled font texture. | |
| GLfloat | printCharGl (const unsigned char &character, const bool &bold, const GLfloat &size) |
| Generates a single Quad with a font character. | |
| float | getLength (const string &text) |
| virtual string | toString () const |
| Returns a textual representation. | |
| virtual string | className () const |
| Returns the class name of the object. | |
| virtual enum classId | classId () const |
| Returns the class id of the object. | |
| Font | operator= (const Font &font) |
| Operator =. | |
Private Attributes | |
| string | fontname |
| struct fontCoords * | sCoords |
| struct fontCoords * | bCoords |
Static Private Attributes | |
| static FontManager * | fontMan = FontManager::getInstance() |
Provides font support for ASCII and Windows-1252 character strings.
| Font::Font | ( | ) |
Standard Constructor.
| Font::Font | ( | const string & | fontname | ) |
Constructor.
If an invalid fontname was choosen, a default font will be generated
| fontname | The font to be loaded |
| Font::Font | ( | const Font & | source | ) |
Copy-constructor.
Duplicates a font
| Font::~Font | ( | ) |
Destructor.
Destroys the font.
| string & Font::getFontname | ( | ) |
Gets texture filename.
| Texture * Font::getStandardTexture | ( | ) |
Gets standard styled font texture.
| Texture * Font::getBoldTexture | ( | ) |
Gets bold styled font texture.
| GLfloat Font::printCharGl | ( | const unsigned char & | character, | |
| const bool & | bold, | |||
| const GLfloat & | size | |||
| ) |
Generates a single Quad with a font character.
Prints a single character to an OpenGL quad. It is assumed, that texturing and blending are enabled and the Modelview matrix is set in such a manner, that the character shall be written top right starting at the origin.
| character | The character to be written | |
| bold | If true, the bold styled texture will be used | |
| size | The line height in which to fit the character in world units |
| float Font::getLength | ( | const string & | text | ) |
| string Font::toString | ( | ) | const [virtual] |
Returns a textual representation.
| string Font::className | ( | ) | const [virtual] |
Returns the class name of the object.
| enum classId Font::classId | ( | ) | const [virtual] |
Returns the class id of the object.
FontManager * Font::fontMan = FontManager::getInstance() [static, private] |
All Font use the same font manager to store their data
string Font::fontname [private] |
struct fontCoords* Font::sCoords [read, private] |
struct fontCoords* Font::bCoords [read, private] |
1.5.6