cee::vis::TrueTypeFont Class Reference

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...
 
- Public Member Functions inherited from cee::vis::Font
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...
 
- Public Member Functions inherited from cee::RefCountedObject
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 Public Member Functions inherited from cee::vis::Font
static PtrRef< FontcreateNormalFont ()
 Creates and returns a 8 pt Droid Sans Regular font. More...
 
static PtrRef< FontcreateLargeFont ()
 Creates and returns a 16 pt Droid Sans Regular font. More...
 
static PtrRef< FontcreateTrueTypeFont (const Str &filename, unsigned int pointSize)
 Creates and returns a true type font using the given font file name and point size. More...
 
Inheritance diagram for cee::vis::TrueTypeFont:
cee::vis::Font cee::RefCountedObject

Detailed Description

A true type font used for text drawing.

This font is loaded from a file.

Constructor & Destructor Documentation

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.

Member Function Documentation

bool cee::vis::TrueTypeFont::isLoaded ( ) const

Returns true if the true type font is properly loaded. (E.g. file not found, illegal format etc.)

unsigned int cee::vis::TrueTypeFont::pointSize ( ) const
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.