Skip to content

load_font

Load a TTF or OTF font. It needs an open window.

Parameters

  • path — A path relative to the working directory.
  • size — A size from 1 to 256.
  • extra_glyphs? — A UTF-8 string of extra characters to load.
local font = load_font("font.ttf", 24)

Related: font, write.

See the text guide for more examples and limits.