cee::vis::Font

class Font : public RefCountedObject

A font used for text drawing.

CEETRON Envision has two built in fonts that work without any dependencies:

These fonts are built into CEETRON Envision and have no external dependencies.

For true type font support, use cee::vis::TrueTypeFont instead.

Subclassed by TrueTypeFont

Public Functions

virtual unsigned int pointSize() const

Returns the point size of the font.

Str name() const

Returns the font name of the font.

float lineSpacing() const

Returns the line spacing.

void setLineSpacing(float factor)

Sets the line spacing.

Line spacing is measured as a proportion of the font height. Default is 1.75 (175%)

Public Static Functions

static PtrRef<Font> createNormalFont()

Creates and returns a 8 pt Droid Sans Regular font.

This font is built into CEETRON Envision and have no external dependencies.

static PtrRef<Font> createLargeFont()

Creates and returns a 16 pt Droid Sans Regular font.

This font is built into CEETRON Envision and have no external dependencies.

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.

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).

Deprecated:

Use cee::vis::TrueTypeFont(const Str&, unsigned int) instead. (Note: Not available on Apple iOS)

Protected Functions

Font()