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::GetAdvanceX

Syntax

float FTGlyphCache::GetAdvanceX(FTFont *fontFace, GlyphCacheEntry *chLeft, utf32 chRight, int pointSize) const;

Returns the horizontal advance in X direction that the 'pen' should be advanced after having rendered chLeft, and moving on to render chRight.

This function takes into account the kerning between characters, if present.

Work in progress:

Todo: in float FTGlyphCache::GetAdvanceX(FTFont *fontFace, GlyphCacheEntry *chLeft, utf32 chRight, int pointSize) const:
Remove for speed.
Todo: in float FTGlyphCache::GetAdvanceX(FTFont *fontFace, GlyphCacheEntry *chLeft, utf32 chRight, int pointSize) const:
Proper error checking.
Todo: in float FTGlyphCache::GetAdvanceX(FTFont *fontFace, GlyphCacheEntry *chLeft, utf32 chRight, int pointSize) const:
Remove for speed.
Todo: in float FTGlyphCache::GetAdvanceX(FTFont *fontFace, GlyphCacheEntry *chLeft, utf32 chRight, int pointSize) const:
Remove for speed.

Syntax

float FTGlyphCache::GetAdvanceX(FTFont *fontFace, utf32 chLeft, utf32 chRight, int pointSize);

A conveniency overload, that also caches chLeft to the glyph cache, which is required for computing the proper advance.

Work in progress:

Todo: in float FTGlyphCache::GetAdvanceX(FTFont *fontFace, utf32 chLeft, utf32 chRight, int pointSize):
Remove for speed!

Leave a Comment

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