Basic Renderer
|
A font that can be used to display text. Characters can be accessed through a single texture atlas. More...
#include <Font.h>
Public Member Functions | |
Font () | |
Constructor. More... | |
Font (const std::string &fontFileName, GLuint fontPixelSize) | |
Constructor. More... | |
virtual | ~Font () |
Virtual destructor. More... | |
virtual void | loadFont (const std::string &fontFileName) |
Loads a font file. More... | |
virtual void | setPixelSize (GLuint fontPixelSize) |
Set the nominal font size in pixels (the characters may vary in size) More... | |
GLuint | getPixelSize () |
Returns the nominal font size in pixels (the characters may vary in size) More... | |
const std::string & | getFontFileName () |
Returns the file name of the current font (including extension) More... | |
virtual ftgl::texture_glyph_t * | getCharacter (char c) |
Returns a character. More... | |
TexturePtr | getAtlas () |
Returns the character atlas. More... | |
virtual void | deleteFont () |
Delete the font and its texture atlas. More... | |
A font that can be used to display text. Characters can be accessed through a single texture atlas.
|
inline |
Constructor.
Font::Font | ( | const std::string & | fontFileName, |
GLuint | fontPixelSize | ||
) |
Constructor.
[in] | fileName | File name including extension |
[in] | fontPixelSize | The nominal font size in pixels (the characters may vary in size) |
|
inlinevirtual |
Virtual destructor.
|
virtual |
Delete the font and its texture atlas.
|
inline |
Returns the character atlas.
|
virtual |
Returns a character.
[in] | c | The character to get |
|
inline |
Returns the file name of the current font (including extension)
|
inline |
Returns the nominal font size in pixels (the characters may vary in size)
|
inlinevirtual |
Loads a font file.
[in] | fileName | File name including extension |
|
inlinevirtual |
Set the nominal font size in pixels (the characters may vary in size)
[in] | fontPixelSize | The nominal font size in pixels |