Kanzi Engine API
kanzi::GlyphCacheManager Class Reference

GlyphCacheManager creates and maintains glyph caches for different font file and font size combinations. More...

#include <kanzi/core.ui/font/glyph_cache_manager.hpp>

Public Member Functions

void clearGlyphCaches ()
 Removes all glyph caches. More...
 
GlyphCachegetGlyphCache (const FontRuntime &font)
 Retrieves the glyph cache associated with the given font and font size. More...
 
 GlyphCacheManager (Domain &domain)
 Constructor. More...
 
void notifyFontDeleted (const FontFile &font)
 Font file notifies the glyph cache manager that Kanzi is deleting that font file. More...
 
void setGlyphCacheSize (unsigned int glyphCacheWidth, unsigned int glyphCacheHeight)
 Sets the size of the textures in glyph caches created by the glyph cache manager. More...
 
 ~GlyphCacheManager ()
 Destructor. More...
 

Detailed Description

GlyphCacheManager creates and maintains glyph caches for different font file and font size combinations.

Constructor & Destructor Documentation

kanzi::GlyphCacheManager::GlyphCacheManager ( Domain domain)
explicit

Constructor.

Parameters
domainThe domain to which you want the glyph cache manager to belong.
kanzi::GlyphCacheManager::~GlyphCacheManager ( )

Destructor.

Member Function Documentation

void kanzi::GlyphCacheManager::setGlyphCacheSize ( unsigned int  glyphCacheWidth,
unsigned int  glyphCacheHeight 
)

Sets the size of the textures in glyph caches created by the glyph cache manager.

Parameters
glyphCacheWidthWidth of textures.
glyphCacheHeightHeight of textures.
GlyphCache& kanzi::GlyphCacheManager::getGlyphCache ( const FontRuntime font)

Retrieves the glyph cache associated with the given font and font size.

If a glyph cache does not yet exist, this function creates a glyph cache.

Parameters
fontFont used for rendering glyphs in the glyph cache.
Returns
Reference to the glyph cache.
void kanzi::GlyphCacheManager::notifyFontDeleted ( const FontFile font)

Font file notifies the glyph cache manager that Kanzi is deleting that font file.

This allows the glyph cache manager to clean up glyph caches for that font.

Parameters
fontFontFile object that is going to be deleted.
void kanzi::GlyphCacheManager::clearGlyphCaches ( )

Removes all glyph caches.


The documentation for this class was generated from the following file: