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.

DSFML cannot preload all the font data in this function, so the file has to remain accessible until the Font object loads a new font or is destroyed.

class Font
bool
loadFromFile
(
const(char)[] filename
)

Parameters

filename
Type: const(char)[]

Path of the font file to load

Return Value

Type: bool

true if loading succeeded, false if it failed.

Meta