- Documentation
- Client functions
- guiCreateFont
Function
guiCreateFont
Creates a font from a resource TTF file for guiSetFont. Size in points.
Syntax
font guiCreateFont(string filepath [, int size = 9])Arguments
filepathstring- Path to the TTF file.
sizeint, optional = 9- Size in points.
Returns
The font or false.
Example
local font = guiCreateFont("fonts/roboto.ttf", 12)
local title = guiCreateLabel(20, 20, 400, 30, "Sklep z bronią", false)
guiSetFont(title, font)
See also
guiSetFontSets a control's font: a built-in name ("default-normal","default-small","default-bold-small","default-bold","clear-normal","sa-header","sa-gothic") or a handle fromguiCreateFont.dxCreateFontCreates a font from a resource TTF/OTF file or from a system typeface (pass its name). The size is in points. Pass the font todxDrawTextandguiSetFont.