loadFont

AssetLoaderModuleInterface::loadFont

Loads a font from a file.

Declaration

virtual Font loadFont(const std::string& filePath, float fontHeight) = 0;

Parameters

Name

Type

Description

filePath

const std::string&

Path to the file to load.

fontHeight

float

Height of the font, in pt.

Returns

A doc:/types/Font/index containing information about the loaded font.

If the font could not be loaded (for example: if the file does not exist, or the Asset Loader Module does not support this font file format), the returned Font contains the structure’s default information.