#include <mmsfbfont.h>
Public Member Functions | |
MMSFBFont (string filename, int w, int h) | |
virtual | ~MMSFBFont () |
bool | isInitialized () |
bool | getStringWidth (string text, int len, int *width) |
bool | getHeight (int *height) |
bool | getAscender (int *ascender) |
bool | getDescender (int *descender) |
bool | getScaleCoeff (float *scale_coeff) |
bool | getGlyph (unsigned int character, MMSFBFont_Glyph *glyph) |
Private Types | |
typedef std::map< std::string, unsigned int > | MMSFBFONT_MAP |
defines mapping between filename and font id | |
Private Member Functions | |
void | lock () |
void | unlock () |
void * | loadFTGlyph (unsigned int character) |
bool | setupFTGlyph (unsigned int character, void *ftg, MMSFBFont_Glyph *glyph) |
Private Attributes | |
bool | initialized |
true if initialized | |
MMSMutex | Lock |
to make it thread-safe | |
void * | dfbfont |
pointer to the directfb font | |
void * | ft_face |
pointer to the loaded freetype face | |
string | filename |
font file | |
unsigned int | font_id |
id of font | |
int | ascender |
ascender | |
int | descender |
descender | |
int | height |
real height of one line | |
std::map< unsigned int, MMSFBFont_Glyph > | charmap |
maps a character id to a already loaded glyph (see glyphpool) | |
Static Private Attributes | |
static void * | ft_library = NULL |
static pointer to the freetype library | |
static MMSFBFONT_MAP | index |
static index | |
static unsigned int | index_pos = 0 |
static index position | |
static unsigned int | numReferences = 0 |
reference counter for final release of freetype library | |
Friends | |
class | MMSFBSurface |
class | MMSFBBackEndInterface |
Definition at line 79 of file mmsfbfont.h.
typedef std::map<std::string, unsigned int> MMSFBFont::MMSFBFONT_MAP [private] |
MMSFBFont::MMSFBFont | ( | string | filename, | |
int | w, | |||
int | h | |||
) |
Definition at line 54 of file mmsfbfont.cpp.
MMSFBFont::~MMSFBFont | ( | ) | [virtual] |
Definition at line 200 of file mmsfbfont.cpp.
void MMSFBFont::lock | ( | ) | [private] |
Definition at line 263 of file mmsfbfont.cpp.
void MMSFBFont::unlock | ( | ) | [private] |
Definition at line 267 of file mmsfbfont.cpp.
void * MMSFBFont::loadFTGlyph | ( | unsigned int | character | ) | [private] |
Definition at line 319 of file mmsfbfont.cpp.
bool MMSFBFont::setupFTGlyph | ( | unsigned int | character, | |
void * | ftg, | |||
MMSFBFont_Glyph * | glyph | |||
) | [private] |
Definition at line 397 of file mmsfbfont.cpp.
bool MMSFBFont::isInitialized | ( | ) |
Definition at line 259 of file mmsfbfont.cpp.
bool MMSFBFont::getStringWidth | ( | string | text, | |
int | len, | |||
int * | width | |||
) |
Definition at line 863 of file mmsfbfont.cpp.
bool MMSFBFont::getHeight | ( | int * | height | ) |
Definition at line 902 of file mmsfbfont.cpp.
bool MMSFBFont::getAscender | ( | int * | ascender | ) |
Definition at line 931 of file mmsfbfont.cpp.
bool MMSFBFont::getDescender | ( | int * | descender | ) |
Definition at line 955 of file mmsfbfont.cpp.
bool MMSFBFont::getScaleCoeff | ( | float * | scale_coeff | ) |
Definition at line 980 of file mmsfbfont.cpp.
bool MMSFBFont::getGlyph | ( | unsigned int | character, | |
MMSFBFont_Glyph * | glyph | |||
) |
Definition at line 807 of file mmsfbfont.cpp.
friend class MMSFBSurface [friend] |
Definition at line 155 of file mmsfbfont.h.
friend class MMSFBBackEndInterface [friend] |
Definition at line 156 of file mmsfbfont.h.
bool MMSFBFont::initialized [private] |
MMSMutex MMSFBFont::Lock [private] |
void* MMSFBFont::dfbfont [private] |
void * MMSFBFont::ft_library = NULL [static, private] |
void* MMSFBFont::ft_face [private] |
string MMSFBFont::filename [private] |
MMSFBFont::MMSFBFONT_MAP MMSFBFont::index [static, private] |
unsigned int MMSFBFont::index_pos = 0 [static, private] |
unsigned int MMSFBFont::font_id [private] |
int MMSFBFont::ascender [private] |
int MMSFBFont::descender [private] |
int MMSFBFont::height [private] |
std::map<unsigned int, MMSFBFont_Glyph> MMSFBFont::charmap [private] |
maps a character id to a already loaded glyph (see glyphpool)
Definition at line 128 of file mmsfbfont.h.
unsigned int MMSFBFont::numReferences = 0 [static, private] |