Kanzi 3.9.10
kanzi::FontEnginePlugin Class Referenceabstract

FontEnginePlugin is the interface definition for font engine plugins. More...

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

Inheritance diagram for kanzi::FontEnginePlugin:
[legend]

Classes

struct  BackendProperties
 Font backend properties. More...
 

Public Types

enum class  FontEngine { MockFontEngine , FreeTypeFontEngine , ITypeFontEngine }
 Enumeration for different types of font engine (rasterizer library). More...
 
- Public Types inherited from kanzi::Module
typedef vector< const Metaclass * > MetaclassContainer
 
typedef MetaclassContainer::iterator MetaclassIterator
 

Public Member Functions

virtual FontEngine getEngineType () const =0
 Returns the font engine type that is used by this font engine plugin.
 
virtual FontLoaderPtr getFontLoader (Domain *domain) const =0
 Creates a FontLoader object.
 
virtual TextShaperPtr getShaper (const FontRuntime &font) const =0
 Creates a TextShaper object.
 
virtual void initialize (const BackendProperties &properties)=0
 Initializes a font backend with the given properties.
 
- Public Member Functions inherited from kanzi::Module
virtual void destroy ()
 
virtual MetaclassContainer getMetaclassesOverride ()
 
 Module ()
 
virtual void registerDebugRenderingFunctions (DebugRenderRegistry &)
 Registers the debug rendering functions of the module.
 
virtual void registerMetadataOverride (ObjectFactory &)
 Registers the rest of the module metadata, such as loaders for types in the module.
 
void setDomain (Domain *domain)
 Sets the domain.
 

Static Public Attributes

static const string s_FreeTypeFontEngineName
 Name of the FreeType font engine plugin.
 
static const string s_iTypeFontEngineName
 Name of the iType font engine plugin.
 

Additional Inherited Members

- Protected Member Functions inherited from kanzi::Module
virtual ~Module ()=default
 Destructor.
 
- Protected Attributes inherited from kanzi::Module
Domainm_domain
 The domain this module is registered to.
 

Detailed Description

FontEnginePlugin is the interface definition for font engine plugins.

Font engine plugins contain both font loaders for creating FontFile objects and shapers. Kanzi uses the shapers to shape text that uses Fonts from the same plugin.

Member Enumeration Documentation

◆ FontEngine

Enumeration for different types of font engine (rasterizer library).

Enumerator
MockFontEngine 

MockFontEngine does not use a rasterizer and you cannot use it to render text.

FreeTypeFontEngine 

FreeTypeFontEngine uses the FreeType rasterizer, HarfBuzz shaper, and ICU bidirectional library, and libunibreak for line breaking.

ITypeFontEngine 

ITypeFontEngine uses the Monotype iType rasterizer and WorldType® Shaper™ for shaping.

Member Function Documentation

◆ getEngineType()

virtual FontEngine kanzi::FontEnginePlugin::getEngineType ( ) const
pure virtual

Returns the font engine type that is used by this font engine plugin.

Returns
Type of the font engine.

Implemented in kanzi::FreeTypeFontEnginePlugin, and kanzi::ItypeFontEnginePlugin.

◆ getFontLoader()

virtual FontLoaderPtr kanzi::FontEnginePlugin::getFontLoader ( Domain * domain) const
pure virtual

Creates a FontLoader object.

Parameters
domainThe UI domain to which you want the font family to belong.
Returns
Pointer to the FontLoader object.

Implemented in kanzi::FreeTypeFontEnginePlugin, and kanzi::ItypeFontEnginePlugin.

◆ getShaper()

virtual TextShaperPtr kanzi::FontEnginePlugin::getShaper ( const FontRuntime & font) const
pure virtual

Creates a TextShaper object.

Parameters
fontThe Font that the shaper will use.
Returns
Pointer to the TextShaper object.

Implemented in kanzi::FreeTypeFontEnginePlugin, and kanzi::ItypeFontEnginePlugin.

◆ initialize()

virtual void kanzi::FontEnginePlugin::initialize ( const BackendProperties & properties)
pure virtual

Initializes a font backend with the given properties.

Parameters
propertiesThe properties with which to initialize a font backend.
Since
Kanzi 3.9.4

Implemented in kanzi::FreeTypeFontEnginePlugin, and kanzi::ItypeFontEnginePlugin.

Member Data Documentation

◆ s_FreeTypeFontEngineName

const string kanzi::FontEnginePlugin::s_FreeTypeFontEngineName
static

Name of the FreeType font engine plugin.

Kanzi uses this name to automatically search and register font engine with this name to be available to the font manager.

◆ s_iTypeFontEngineName

const string kanzi::FontEnginePlugin::s_iTypeFontEngineName
static

Name of the iType font engine plugin.

Kanzi uses this name to automatically search and register font engine with this name to be available to the font manager.


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