FIFE
2008.0
|
#include <truetypefont.h>
Public Member Functions | |
TrueTypeFont (const std::string &filename, int size) | |
virtual | ~TrueTypeFont () |
virtual int | getWidth (const std::string &text) const |
virtual int | getHeight () const |
![]() | |
void | setRowSpacing (int spacing) |
int | getRowSpacing () const |
void | setGlyphSpacing (int spacing) |
int | getGlyphSpacing () const |
void | setAntiAlias (bool antiAlias) |
bool | isAntiAlias () |
Image * | getAsImage (const std::string &text) |
Image * | getAsImageMultiline (const std::string &text) |
SDL_Color | getColor () const |
![]() | |
virtual void | setColor (uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)=0 |
SDL True Type Font implementation of Font. It uses the SDL_ttf library to display True Type Fonts with SDL.
NOTE: You must initialize the SDL_ttf library before using this class. Also, remember to call the SDL_ttf libraries quit function.
Original author of this class is Walluce Pinkham. Some modifications made by the Guichan team, and additonal modifications by the FIFE team.
Definition at line 51 of file truetypefont.h.
FIFE::TrueTypeFont::TrueTypeFont | ( | const std::string & | filename, |
int | size | ||
) |
Constructor.
filename | the filename of the True Type Font. |
size | the size the font should be in. |
Definition at line 42 of file truetypefont.cpp.
|
virtual |
Destructor.
Definition at line 55 of file truetypefont.cpp.
|
virtual |
gets height of this font
Implements FIFE::AbstractFont.
Definition at line 66 of file truetypefont.cpp.
References FIFE::FontBase::getRowSpacing().
|
virtual |
gets width of given text
Implements FIFE::AbstractFont.
Definition at line 59 of file truetypefont.cpp.