In file uta/programmer.doc:

namespace uta class Font

FreeType based surface font

Public Fields

static Color defaultFontColor
static Color defaultFadeColor

Public Methods

Font(const string& fontfilename, int ptsize = 12)
Constructor
Font(const string& fontfilename, int ptsize, const Color &fontCol, const Color &backCol)
Constructor
Font(const Font& )
Font()
Font(const Surface* img)
this assumes a surface where all chars are drawn in one row
~Font()
void create(const string& fontfilename, int ptsize = 12, const Color &fontCol = Font::defaultFontColor, const Color &backCol = Font::defaultFadeColor)
Surface* getChar(unsigned char ) const
return surfacerepresentation of a char
Surface* getString(const string & ) const
return bitmaprepresentation of a string
int blitString(const string&, Surface* target, const Point& pos) const
int blitString(const string&, Surface* target, const Point& pos, const vector<Color>& pal) const
Point getSize(unsigned char c) const
return size of given character
int getHeight() const
maximum height of this font in pixels
const Color& fontColor() const
const Color& fadeColor() const

Protected Fields

bool initialized_
int ptsize_
size in points
int height_
max height in pixels
Color fontColor_
Color backColor_
Surface** surfaceTable_

Protected Methods

Surface* getCharPtr(unsigned char ) const
Surface* renderChar(unsigned char )
void createPalette()
void createFont()

Protected

static members
static TT_Engine engine
truetype engine
static int engineLock
FreeType related members
TT_Face face_
TT_Instance instance_
TT_Face_Properties properties_
TT_Glyph glyph_
Color* palette_
TT_Glyph_Metrics metric_
TT_UShort platform_
TT_UShort encoding_
TT_CharMap cmap_
TT_Instance_Metrics imetrics_
TT_Raster_Map rastermap_
static members
static TT_Engine engine
truetype engine
static int engineLock
FreeType related members
TT_Face face_
TT_Instance instance_
TT_Face_Properties properties_
TT_Glyph glyph_
Color* palette_
TT_Glyph_Metrics metric_
TT_UShort platform_
TT_UShort encoding_
TT_CharMap cmap_
TT_Instance_Metrics imetrics_
TT_Raster_Map rastermap_
static members
static TT_Engine engine
truetype engine
static int engineLock
FreeType related members
TT_Face face_
TT_Instance instance_
TT_Face_Properties properties_
TT_Glyph glyph_
Color* palette_
TT_Glyph_Metrics metric_
TT_UShort platform_
TT_UShort encoding_
TT_CharMap cmap_
TT_Instance_Metrics imetrics_
TT_Raster_Map rastermap_
static members
static TT_Engine engine
truetype engine
static int engineLock
FreeType related members
TT_Face face_
TT_Instance instance_
TT_Face_Properties properties_
TT_Glyph glyph_
Color* palette_
TT_Glyph_Metrics metric_
TT_UShort platform_
TT_UShort encoding_
TT_CharMap cmap_
TT_Instance_Metrics imetrics_
TT_Raster_Map rastermap_

Documentation

FreeType based surface font. This class uses the benefit of truetype fonts (antialiasing, *many* free fonts) as well as the speed gain of surface fonts. When creating an object of Font the surfaces for the characters are all rendered in best quality. When the font-object is asked to create a surface from a string it just blits these character surfaces, which is quite fast.
static Color defaultFontColor

static Color defaultFadeColor

Font(const string& fontfilename, int ptsize = 12)
Constructor. fontfilename has to be the name of a truetype font file. The font colors are read from Resources if available.

Font(const string& fontfilename, int ptsize, const Color &fontCol, const Color &backCol)
Constructor. fontfilename has to be the name of a truetype font file.

Font(const Font& )

Font()

Font(const Surface* img)
this assumes a surface where all chars are drawn in one row

~Font()

void create(const string& fontfilename, int ptsize = 12, const Color &fontCol = Font::defaultFontColor, const Color &backCol = Font::defaultFadeColor)

Surface* getChar(unsigned char ) const
return surfacerepresentation of a char. if no font is loaded, the surface returned is empty.

Surface* getString(const string & ) const
return bitmaprepresentation of a string. if no font is loaded, the bitmap returned is empty.

int blitString(const string&, Surface* target, const Point& pos) const

int blitString(const string&, Surface* target, const Point& pos, const vector<Color>& pal) const

Point getSize(unsigned char c) const
return size of given character

int getHeight() const
maximum height of this font in pixels

const Color& fontColor() const

const Color& fadeColor() const

bool initialized_

Surface* getCharPtr(unsigned char ) const

Surface* renderChar(unsigned char )

void createPalette()

void createFont()

static members

static TT_Engine engine
truetype engine

static int engineLock

int ptsize_
size in points

int height_
max height in pixels

Color fontColor_

Color backColor_

Surface** surfaceTable_

FreeType related members

TT_Face face_

TT_Instance instance_

TT_Face_Properties properties_

TT_Glyph glyph_

Color* palette_

TT_Glyph_Metrics metric_

TT_UShort platform_

TT_UShort encoding_

TT_CharMap cmap_

TT_Instance_Metrics imetrics_

TT_Raster_Map rastermap_


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de