A true type font used for text drawing. More...
Public Member Functions | |
TrueTypeFont (const Str &filename, unsigned int pointSize) | |
Creates a true type font using the given font file name and point size. More... | |
unsigned int | pointSize () const |
Returns the point size of the true type font. More... | |
void | setPointSize (unsigned int size) |
Sets the point size of the true type font. More... | |
bool | isLoaded () const |
Returns true if the true type font is properly loaded. (E.g. file not found, illegal format etc.) More... | |
![]() | |
Str | name () const |
Returns the font name of the font. More... | |
float | lineSpacing () const |
Returns the line spacing. More... | |
void | setLineSpacing (float factor) |
Sets the line spacing. More... | |
![]() | |
void | addRef () const |
Increments the reference count for this object. More... | |
void | release () const |
Decrements the reference count for this object. More... | |
int | refCount () const |
Returns the reference count for this object. More... | |
void | setRefCountZero () const |
Sets the ref count to zero, but DOES NOT delete the object. More... | |
Additional Inherited Members | |
![]() | |
static PtrRef< Font > | createNormalFont () |
Creates and returns a 8 pt Droid Sans Regular font. More... | |
static PtrRef< Font > | createLargeFont () |
Creates and returns a 16 pt Droid Sans Regular font. More... | |
static PtrRef< Font > | createTrueTypeFont (const Str &filename, unsigned int pointSize) |
Creates and returns a true type font using the given font file name and point size. More... | |
A true type font used for text drawing.
This font is loaded from a file.
cee::vis::TrueTypeFont::TrueTypeFont | ( | const Str & | filename, |
unsigned int | pointSize | ||
) |
Creates a true type font using the given font file name and point size.
A valid .ttf file must be provided.
bool cee::vis::TrueTypeFont::isLoaded | ( | ) | const |
Returns true if the true type font is properly loaded. (E.g. file not found, illegal format etc.)
|
virtual |
Returns the point size of the true type font.
Reimplemented from cee::vis::Font.
void cee::vis::TrueTypeFont::setPointSize | ( | unsigned int | size | ) |
Sets the point size of the true type font.