Back to class index
FTGlyphCache[Class Summary]
ctor
~dtor
Init(cacheSurfaceSize)
DeInit()
LoadFontFace(filename,faceIndex)
FontFace(filename,faceIndex)
FontFaces()
AtlasTexture()
GetAdvanceX(...)[const] (+1 overload)
CacheCharacter(...)
GetCharacterSize(...)
GetCharacterUVTopLeft(font,ch)
GetCacheTexture()
Occupancy()[const]
MeasureTextWidth(str,font,pointSize)

FTGlyphCache::LoadFontFace

Syntax

FTFont * FTGlyphCache::LoadFontFace(const char *filename, int faceIndex=0);

Loads a new font into the cache.

Doesn't check if the font was already loaded, but just adds it as new.

Parameters

const char *filenameThe .TTF file (or any other font type supported by FT2) to load. intfaceIndexThe font face index to load from the file. If omitted, loads the first face as default.

Return Value

A pointer to the font structure, or 0 if the call did not succeed. FTGlyphCache will own the FTFont pointer and free it up when FTGlyphCache is deinitialized, so don't delete manually.

Leave a Comment

Name:
Comments:
Captcha:captcha image Type in the black symbols:
Back to class index