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

Function

dxSetFontStyle

ClientDrawing (dx)Trilogy Hub only

Changes the style of a font from dxCreateFont: bold, italic, underline, strike, weight, spacing, widthScale, shadow, outline, outlineColor, gradient, lineSpacing, size. Pass one key or a table.

Syntax

bool dxSetFontStyle(font font, string|table key [, mixed value])

Arguments

fontfont
The font.
keystring|table
A key or a { key = value } table.
valuemixed, optional
The value.

Returns

true on success.

Example

local font = dxCreateFont("Segoe UI", 16)
dxSetFontStyle(font, { outline = 2, outlineColor = tocolor(0, 0, 0), spacing = 1 })

See also