FONScontextInternal.addFont

Add font to FontStash.

Load scalable font from disk, and add it to FontStash. If you will try to load a font with same name and path several times, FontStash will load it only once. Also, you can load new disk font for any existing logical font.

struct FONScontextInternal
nothrow @trusted
int
addFont
(
const(char)[] name
,
const(char)[] path
,
bool defAA = false
)

Parameters

name const(char)[]

logical font name, that will be used to select this font later.

path const(char)[]

path to disk file with your font.

defAA bool

should FontStash use antialiased font rasterizer?

Return Value

Type: int

font id or FONS_INVALID.

Meta