Kanzi 3.9.10
kanzi::FontManager Class Reference

Use the FontManager class to: More...

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

Public Member Functions

 FontManager (Domain *domain)
 Constructor.
 
BitmapFontLoadergetBitmapFontLoader ()
 Gets a bitmap font loader.
 
FontEnginePlugin::FontEngine getFontEngine () const
 Returns the font engine used when fetching font loaders.
 
FontLoadergetFontLoader ()
 Gets a font loader.
 
FontLoadergetFontLoader (FontEnginePlugin::FontEngine engine)
 Gets a font loader using the specified font engine type.
 
GlyphCacheManagergetGlyphCacheManager () const
 Returns the glyph cache manager.
 
FontRuntimeSharedPtr getRuntimeFont (FontFamilySharedPtr fontFamily, const FontStyleDefinition &fontStyleDefinition)
 Creates a runtime font you can use to draw text with passed fontFamily and fontStyleDefinition.
 
TextShaperPtr getShaper (const FontRuntime &font) const
 Gets a text shaper, which can shape text rendered with given font.
 
void setBackendProperties (FontEnginePlugin::FontEngine engine, const FontEnginePlugin::BackendProperties &properties)
 Sets the font backend properties that are used by FontEngine.
 
void setFontEngine (FontEnginePlugin::FontEngine engine)
 Sets the font engine backend to use when fetching font loaders.
 
bool tryLoadFontEngine (FontEnginePlugin::FontEngine engine) const
 Automatically recognizes and loads the plugin for a font engine backend.
 
virtual ~FontManager ()
 Destructor.
 

Friends

class Domain
 
class FontRuntime
 

Detailed Description

Use the FontManager class to:

  • Set the font rasterizer engine that you want to use.
  • Access a FontLoader to create a font file object.
  • Access GlyphCacheManager and GlyphCaches.
    Since
    Kanzi 3.7.0

Constructor & Destructor Documentation

◆ FontManager()

kanzi::FontManager::FontManager ( Domain * domain)
explicit

Constructor.

Parameters
domainThe domain that owns the font manager.

◆ ~FontManager()

virtual kanzi::FontManager::~FontManager ( )
virtual

Destructor.

Member Function Documentation

◆ getBitmapFontLoader()

BitmapFontLoader & kanzi::FontManager::getBitmapFontLoader ( )

Gets a bitmap font loader.

When needed, Kanzi automatically creates a bitmap font loader.

Returns
Reference to the bitmap font loader.

◆ getFontLoader() [1/2]

FontLoader & kanzi::FontManager::getFontLoader ( )

Gets a font loader.

When needed, Kanzi automatically creates a font loader.

Returns
Reference to the font loader.

◆ getFontLoader() [2/2]

FontLoader & kanzi::FontManager::getFontLoader ( FontEnginePlugin::FontEngine engine)

Gets a font loader using the specified font engine type.

When needed, Kanzi automatically creates a font loader.

Parameters
engineThe type of font engine to use for this loader.
Returns
Reference to the font loader.

◆ setFontEngine()

void kanzi::FontManager::setFontEngine ( FontEnginePlugin::FontEngine engine)

Sets the font engine backend to use when fetching font loaders.

If the font engine backend is not already loaded, Kanzi loads the requested backend.

Parameters
engineThe type of font engine backend to use.

◆ getFontEngine()

FontEnginePlugin::FontEngine kanzi::FontManager::getFontEngine ( ) const

Returns the font engine used when fetching font loaders.

Returns
Font engine used when fetching font loaders.

◆ getGlyphCacheManager()

GlyphCacheManager & kanzi::FontManager::getGlyphCacheManager ( ) const

Returns the glyph cache manager.

Returns
Reference to the glyph cache manager.

◆ getShaper()

TextShaperPtr kanzi::FontManager::getShaper ( const FontRuntime & font) const

Gets a text shaper, which can shape text rendered with given font.

Parameters
fontFont used in the text to be shaped.
Returns
Pointer to the shaper object.

◆ tryLoadFontEngine()

bool kanzi::FontManager::tryLoadFontEngine ( FontEnginePlugin::FontEngine engine) const

Automatically recognizes and loads the plugin for a font engine backend.

Returns
If the function successfully loads the plugins for a font engine backend, returns true, otherwise false.

◆ getRuntimeFont()

FontRuntimeSharedPtr kanzi::FontManager::getRuntimeFont ( FontFamilySharedPtr fontFamily,
const FontStyleDefinition & fontStyleDefinition )

Creates a runtime font you can use to draw text with passed fontFamily and fontStyleDefinition.

Parameters
fontFamilyA font family the runtime font uses.
fontStyleDefinitionFont style that the returned runtime font object must use.
Returns
Pointer to the runtime font object.
Since
Kanzi 3.8.0

◆ setBackendProperties()

void kanzi::FontManager::setBackendProperties ( FontEnginePlugin::FontEngine engine,
const FontEnginePlugin::BackendProperties & properties )

Sets the font backend properties that are used by FontEngine.

Parameters
engineFontEngine for which to set the backend properties.
propertiesFont backend properties to set, such as optional dictionaries.
Since
Kanzi 3.9.4

Friends And Related Symbol Documentation

◆ FontRuntime

◆ Domain


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