ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. guiCreateFont

Function

guiCreateFont

ClientInterface (GUI)Identical to MTA:SA

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