FontLoader implementation for the Freetype rasterizer. More...
#include <kanzi/plugins/freetype/freetype_font_loader.hpp>
Public Member Functions | |
FontFileSharedPtr | createFont (string_view name) override |
Creates an empty FontFile object. | |
FontFileSharedPtr | createFontFromFile (string_view filePath) override |
Creates a FontFile object from a file. | |
FontFileSharedPtr | createFontFromMemory (const byte *data, size_t size, string_view name, bool createMemoryCopy) override |
Creates a FontFile object from the memory. | |
FreeTypeFontLoader (Domain *domain) | |
Constructor. | |
~FreeTypeFontLoader () override | |
Destructor. | |
Public Member Functions inherited from kanzi::FontLoader | |
FontLoader (Domain *domain) | |
Constructor. | |
virtual | ~FontLoader () |
Destructor. | |
Friends | |
class | FreeTypeFontFile |
Additional Inherited Members | |
Protected Member Functions inherited from kanzi::FontLoader | |
Domain * | getDomain () |
Returns the domain used to construct the FontLoader. | |
FontLoader implementation for the Freetype rasterizer.
Use it to create FreetypeFontFile objects from memory or a file.
|
explicit |
Constructor.
domain | Pointer to domain object. |
|
override |
Destructor.
|
overridevirtual |
Creates an empty FontFile object.
Load the font data using the FreetypeFontFile::loadFromKZB() function.
name | Name of the created FontFile object. |
Reimplemented from kanzi::FontLoader.
|
overridevirtual |
Creates a FontFile object from a file.
filePath | Full path to the font file, including the file name. Kanzi uses the file name to set the font name. |
If | the method cannot read the font file, throws KZS_EXCEPTION_FILE_OPEN_FAILED. |
Reimplemented from kanzi::FontLoader.
|
overridevirtual |
Creates a FontFile object from the memory.
data | Pointer to the font data in the memory. |
size | Size of the font data in the memory. |
name | Name of the created FontFile object. |
createMemoryCopy | Whether you want to create a copy of the given font data for the object. |
Reimplemented from kanzi::FontLoader.
|
friend |