A font used for text drawing. More...
Public Member Functions | |
virtual unsigned int | pointSize () const |
Returns the point size of the font. 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... | |
Static Public Member Functions | |
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 font used for text drawing.
Ceetron Desktop Components has two built in fonts that work without any dependencies:
These fonts are built into Ceetron Desktop Components and have no external dependencies.
For true type font support, use cee::vis::TrueTypeFont instead.
Creates and returns a 16 pt Droid Sans Regular font.
This font is built into Ceetron Desktop Components and have no external dependencies.
Creates and returns a 8 pt Droid Sans Regular font.
This font is built into Ceetron Desktop Components and have no external dependencies.
|
static |
Creates and returns a true type font using the given font file name and point size.
A valid .ttf file must be provided.
Returns NULL if an error occurred creating the font from the given file (file not found, illegal format etc).
float cee::vis::Font::lineSpacing | ( | ) | const |
Returns the line spacing.
cee::Str cee::vis::Font::name | ( | ) | const |
Returns the font name of the font.
|
virtual |
Returns the point size of the font.
Reimplemented in cee::vis::TrueTypeFont.
void cee::vis::Font::setLineSpacing | ( | float | factor | ) |
Sets the line spacing.
Line spacing is measured as a proportion of the font height. Default is 1.75 (175%)