loadFont

Script::loadFont

Loads a font from a file in the Asset Manager 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), the returned pointer is nullptr.