loadFontSDF
AssetManager::loadFontSDF
Loads a font from a file and returns a pointer to the loaded font.
Declaration
Font* loadFontSDF(const std::string& filePath);
Parameters
Name |
Type |
Description |
---|---|---|
filePath |
const std::string& |
Path to the file to load. |
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.
A SDF font scales well, but is less precise than Bitmap fonts when the text is small.