Font.loadFromMemory

Load the font from a file in memory.

The supported font formats are: TrueType, Type 1, CFF, OpenType, SFNT, X11 PCF, Windows FNT, BDF, PFR and Type 42.

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

class Font
bool
loadFromMemory
(
const(void)[] data
)

Parameters

data
Type: const(void)[]

data holding the font file

Return Value

Type: bool

true if loading succeeded, false if it failed.

Meta