FontLoader implementation for bitmap fonts.
More...
#include <kanzi/core.ui/font/bitmap_font_loader.hpp>
FontLoader implementation for bitmap fonts.
Use it to create BitmapFontFile objects from the memory or a file.
◆ BitmapFontLoader()
kanzi::BitmapFontLoader::BitmapFontLoader |
( |
Domain * |
domain | ) |
|
|
explicit |
Constructor.
- Parameters
-
domain | Pointer to domain object. |
◆ ~BitmapFontLoader()
kanzi::BitmapFontLoader::~BitmapFontLoader |
( |
| ) |
|
|
override |
◆ createFont()
Creates an empty FontFile object.
Load the font data using the BitmapFontFile::loadFromKZB() function.
- Parameters
-
name | Name of the created FontFile object. |
- Returns
- Shared pointer to the created FontFile object.
Reimplemented from kanzi::FontLoader.
◆ createFontFromFile()
FontFileSharedPtr kanzi::BitmapFontLoader::createFontFromFile |
( |
string_view |
filePath | ) |
|
|
overridevirtual |
◆ createFontFromMemory()
FontFileSharedPtr kanzi::BitmapFontLoader::createFontFromMemory |
( |
const byte * |
data, |
|
|
size_t |
size, |
|
|
string_view |
name, |
|
|
bool |
createMemoryCopy |
|
) |
| |
|
overridevirtual |
Creates a FontFile object from the memory.
You must load bitmap files separately by calling BitmapFontFile::loadTexturesFromPath() after you create a font using this function.
- Parameters
-
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 | True 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.
◆ BitmapFontFile
The documentation for this class was generated from the following file: