- Documentation
- Client functions
- dxSetFontStyle
Function
dxSetFontStyle
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
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.dxGetFontInfoReturns a font description: the typeface (family), the size in pixels (px) and points (size), style settings and the source.