Font.loadFromStream

Load the font from a custom stream.

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 contents of stream have to remain valid as long as the font is used.

class Font
bool
loadFromStream

Parameters

stream

Source stream to read from

Return Value

Type: bool

true if loading succeeded, false if it failed.

Meta