Use FontLoader to create FontFile objects from memory or a file.
More...
#include <kanzi/core.ui/font/font_loader.hpp>
Use FontLoader to create FontFile objects from memory or a file.
You can create pure FontFile objects using the base class. However, in most cases, use the derived classes specific to a rasterizer.
kanzi::FontLoader::FontLoader |
( |
Domain * |
domain | ) |
|
|
explicit |
Constructor.
- Parameters
-
domain | Pointer to domain object. |
virtual kanzi::FontLoader::~FontLoader |
( |
| ) |
|
|
virtual |
virtual FontFileSharedPtr kanzi::FontLoader::createFontFromFile |
( |
string_view |
filePath | ) |
|
|
virtual |
Creates a font from a file.
- Parameters
-
filePath | Full 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 font file object.
- Exceptions
-
KZS_EXCEPTION_FILE_OPEN_FAILED | if font file cannot be read. |
Reimplemented in kanzi::FreeTypeFontLoader, kanzi::ItypeFontLoader, and kanzi::BitmapFontLoader.
virtual FontFileSharedPtr kanzi::FontLoader::createFontFromMemory |
( |
const byte * |
data, |
|
|
size_t |
size, |
|
|
string_view |
name, |
|
|
bool |
createMemoryCopy |
|
) |
| |
|
virtual |
Domain* kanzi::FontLoader::getDomain |
( |
| ) |
|
|
protected |
Returns the domain used to construct the FontLoader.
- Returns
- Pointer to the domain.
The documentation for this class was generated from the following file: