Kanzi  3.9.6
Kanzi Engine API
kanzi::ItypeFontLoader Class Reference

FontLoader implementation for Monotype's iType rasterizer. More...

#include <kanzi/plugins/itype/itype_font_loader.hpp>

Inheritance diagram for kanzi::ItypeFontLoader:
[legend]

Public Member Functions

FontFileSharedPtr createFont (string_view name) override
 Creates an empty FontFile object. More...
 
FontFileSharedPtr createFontFromFile (string_view filePath) override
 Creates a FontFile object from a file. More...
 
FontFileSharedPtr createFontFromMemory (const byte *data, size_t size, string_view name, bool createMemoryCopy) override
 Creates a FontFile object from the memory. More...
 
 ItypeFontLoader (Domain *domain)
 Constructor. More...
 
virtual ~ItypeFontLoader ()
 Destructor. More...
 
- Public Member Functions inherited from kanzi::FontLoader
 FontLoader (Domain *domain)
 Constructor. More...
 
virtual ~FontLoader ()
 Destructor. More...
 

Friends

class ItypeFontFile
 

Additional Inherited Members

- Protected Member Functions inherited from kanzi::FontLoader
DomaingetDomain ()
 Returns the domain used to construct the FontLoader. More...
 

Detailed Description

FontLoader implementation for Monotype's iType rasterizer.

Use it to create ItypeFontFile objects from memory or a file.

Constructor & Destructor Documentation

◆ ItypeFontLoader()

kanzi::ItypeFontLoader::ItypeFontLoader ( Domain domain)
explicit

Constructor.

Parameters
domainPointer to domain object.

◆ ~ItypeFontLoader()

virtual kanzi::ItypeFontLoader::~ItypeFontLoader ( )
virtual

Destructor.

Member Function Documentation

◆ createFont()

FontFileSharedPtr kanzi::ItypeFontLoader::createFont ( string_view  name)
overridevirtual

Creates an empty FontFile object.

Load the font data using the ItypeFontFile::loadFromKZB() function.

Parameters
nameName of the created FontFile object.
Returns
Shared pointer to the created FontFile object.

Reimplemented from kanzi::FontLoader.

◆ createFontFromFile()

FontFileSharedPtr kanzi::ItypeFontLoader::createFontFromFile ( string_view  filePath)
overridevirtual

Creates a FontFile object from a file.

Parameters
filePathFull path to the font file, including the file name. Kanzi uses the file name to set the font name.
Returns
Shared pointer to the created FontFile object.
Exceptions
Ifthe method cannot read the font file, throws KZU_ERROR_ITYPE_FAILED.

Reimplemented from kanzi::FontLoader.

◆ createFontFromMemory()

FontFileSharedPtr kanzi::ItypeFontLoader::createFontFromMemory ( const byte data,
size_t  size,
string_view  name,
bool  createMemoryCopy 
)
overridevirtual

Creates a FontFile object from the memory.

Parameters
dataPointer to the font data in the memory.
sizeSize of the font data in the memory.
nameName of the created FontFile object.
createMemoryCopyTrue if you want to create for the object a new copy of the given font data.
Returns
Shared pointer to the created FontFile object.

Reimplemented from kanzi::FontLoader.

Friends And Related Function Documentation

◆ ItypeFontFile

friend class ItypeFontFile
friend

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