Module font

Functions to loads font files and manipulate them

Functions

new (font_file[, size=12]) Loads a font file.
free (font) Releases a font from memory.
setdefault ([font]) Sets the current default font.
getdefault () Gets the current default font.
tostring (colour) Gets the string representation of the colour.


Functions

new (font_file[, size=12])
Loads a font file.

Parameters:

  • font_file Path of the font file.
  • size The size of glyphs. (default 12)

Returns:

    New font object.
free (font)
Releases a font from memory.

Parameters:

  • font The font which wull be released.
setdefault ([font])
Sets the current default font.

Parameters:

  • font The font object to set as default, nil to reset it. (optional)
getdefault ()
Gets the current default font.

Returns:

    A font object.
tostring (colour)
Gets the string representation of the colour.

Parameters:

  • colour A colour object.

Returns:

    String representation of the colour.
generated by LDoc 1.4.6 Last updated 2022-08-01 11:21:18