|
NWengine 0.9
|
Class representing a font asset. More...
#include <Font.h>
Public Member Functions | |
| bool | LoadFont (std::string path) |
| Loads a font from a file. | |
| void | Clean () override |
| Clean up the asset. | |
| Asset * | GetFromCache (void *identifier) override |
| Get the asset from the cache based on the identifier. | |
| Asset * | LoadFromFile (const char *path, void *data) override |
| Load the asset from file based on the file path. | |
| Asset * | LoadFromBuffer (void *ftFace, void *data) override |
| Load the asset from a buffer. | |
| NW_DECL_RES_LIST (FontIdentifier, Font) | |
Public Member Functions inherited from Asset | |
| virtual Asset * | LoadFromFileOrGetFromCache (void *identifier, const char *path, void *data) |
| Load the asset from file or get it from the cache based on the identifier and file path. | |
| virtual Asset * | LoadFromBufferOrGetFromCache (void *identifier, void *buffer, void *data) |
| Load the asset from a buffer or get it from the cache based on the identifier. | |
Static Public Member Functions | |
| static bool | Init () |
| Initializes the FreeType library. | |
| static void | Destroy () |
| Destroys the FreeType library. | |
Public Attributes | |
| std::unordered_map< char, Glyph > | charactersMap |
Public Attributes inherited from Asset | |
| int | _usageCounter = 0 |
Static Public Attributes | |
| static NW_FT_Lib | lib |
Class representing a font asset.
Get the asset from the cache based on the identifier.
| identifier | The identifier of the asset. |
Reimplemented from Asset.
|
static |
Initializes the FreeType library.
| bool Font::LoadFont | ( | std::string | path | ) |
Loads a font from a file.
| path | The path to the font file. |
Load the asset from a buffer.
| buffer | The buffer containing the asset data. |
| data | Additional data for loading the asset. |
Reimplemented from Asset.
Load the asset from file based on the file path.
| path | The file path of the asset. |
| data | Additional data for loading the asset. |
Reimplemented from Asset.
|
static |
The FreeType library.