Stores a 2D cache surface of pre-rasterized FreeType2 glyphs.
FTGlyphCache | Stores a 2D cache surface of pre-rasterized FreeType2 glyphs. |
ctor | |
~dtor | |
Init(cacheSurfaceSize) | Initializes the glyph cache with the given square texture size. Call only once at the beginning. |
DeInit() | Frees up all internal data. |
LoadFontFace(filename,faceIndex) | Loads a new font into the cache. |
FontFace(filename,faceIndex) | Returns an existing font face with the given name. |
FontFaces() | Returns all the fonts that are loaded to be used with this font cache. |
AtlasTexture() | Returns the cache texture object where the font glyphs have been packed to. |
GetAdvanceX(...)[const] (+1 overload) | Returns the horizontal advance in X direction that the 'pen' should be advanced after having rendered chLeft, and moving on to render chRight. |
CacheCharacter(...) | Caches a single character with the given pointsize and color to the atlas. |
GetCharacterSize(...) | Returns the size of the given character glyph, in pixel units. |
GetCharacterUVTopLeft(font,ch) | Returns the UV coordinates of |
GetCacheTexture() | Returns the texture atlas object. Bind this to the Renderer texture unit when drawing characters. |
Occupancy()[const] | Returns the percentage of used pixel surface area in the glyph cache texture. |
MeasureTextWidth(str,font,pointSize) | Computes the width of the given text string when rendered using the given font. |