Font.loadFromFile

Load the font from a file.

The supported font formats are: TrueType, Type 1, CFF, OpenType, SFNT, X11 PCF, Windows FNT, BDF, PFR and Type 42. Note that this function know nothing about the standard fonts installed on the user's system, thus you can't load them directly.

class Font
bool
loadFromFile
(
string filename
)

Parameters

filename string

Path of the font file to load

Return Value

Type: bool

True if loading succeeded, false if it failed.

Meta