Text:font

Returns the name of the font used to draw text.

The actual font object can be retrieved via crystal.ui.font() if needed.

Usage

text:font()

Returns

Name Type Description
font_name string Name of the font used to draw text.

Examples

local text = crystal.Text:new("Hello World");
text:set_font("crystal_regular_sm");
print(text:font()); -- Prints "crystal_regular_sm"

This site uses Just the Docs, a documentation theme for Jekyll.