loadFont
AssetManager::loadFont
Loads a font from a file and returns a pointer to the loaded font.
Declaration
Font* loadFont(const std::string& filePath, float fontHeight);
Parameters
Name |
Type |
Description |
---|---|---|
filePath |
const std::string& |
Path to the file to load. |
fontHeight |
float |
Height of the font, in pt. |
Returns
A pointer to a Font containing information about the loaded font.
If the font could not be loaded (for example: if the file does not exist, or the Asset Manager or Asset Loader Module does not support this font file format (including the case where there is no Asset Loader Module)), the returned pointer is nullptr.