FIFE  2008.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
FIFE::TrueTypeFont Class Reference

#include <truetypefont.h>

Inheritance diagram for FIFE::TrueTypeFont:
Inheritance graph
Collaboration diagram for FIFE::TrueTypeFont:
Collaboration graph

Public Member Functions

 TrueTypeFont (const std::string &filename, int32_t size)
 
virtual ~TrueTypeFont ()
 
virtual int32_t getWidth (const std::string &text) const
 
virtual int32_t getHeight () const
 
- Public Member Functions inherited from FIFE::FontBase
void setRowSpacing (int32_t spacing)
 
int32_t getRowSpacing () const
 
void setGlyphSpacing (int32_t spacing)
 
int32_t getGlyphSpacing () const
 
void setAntiAlias (bool antiAlias)
 
bool isAntiAlias ()
 
ImagegetAsImage (const std::string &text)
 
ImagegetAsImageMultiline (const std::string &text)
 
SDL_Color getColor () const
 
- Public Member Functions inherited from FIFE::IFont
virtual void setColor (uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)=0
 

Detailed Description

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.

Constructor & Destructor Documentation

FIFE::TrueTypeFont::TrueTypeFont ( const std::string &  filename,
int32_t  size 
)

Constructor.

Parameters
filenamethe filename of the True Type Font.
sizethe size the font should be in.

Definition at line 42 of file truetypefont.cpp.

FIFE::TrueTypeFont::~TrueTypeFont ( )
virtual

Destructor.

Definition at line 55 of file truetypefont.cpp.

Member Function Documentation

int32_t FIFE::TrueTypeFont::getHeight ( ) const
virtual

gets height of this font

Implements FIFE::IFont.

Definition at line 66 of file truetypefont.cpp.

References FIFE::FontBase::getRowSpacing().

int32_t FIFE::TrueTypeFont::getWidth ( const std::string &  text) const
virtual

gets width of given text

Implements FIFE::IFont.

Definition at line 59 of file truetypefont.cpp.


The documentation for this class was generated from the following files: