Skip to content

draw.AddFontResource

Add .ttf file data to available fonts.

Syntax

draw.AddFontResource(string:ttfdata)

Parameters

string:ttfdata The .ttf file data.

Example

draw.AddFontResource("location/to/ttf/file.ttf")
local Font = draw.CreateFont("ttfname", 20, 100)

callbacks.Register("Draw", function()
    draw.SetFont(Font);

    draw.Color(255, 138, 130, 255);

    draw.Text(60, 60, "Text");
end)

Note

For more information about the different types of fonts check the Font List.