Drawing/font

This module provides functions to retrieve fonts present in the system.

Methods

(inner) getDefaultId()

This function returns the default font id of the system.
Example
System.println("Default font id is: " +  Drawing.font.getDefaultId());
Returns:
The identifier of the default font

(inner) getId(font)

This function returns the font identifier associated to a font. Note that the font id must not be stored because it can change between runs when new fonts are installed.
Example
System.println("Arial font id is: " +  Drawing.font.getId("Arial"));
Parameters:
Name Type Description
font String The font name.
Returns:
The identifier of the font passed in param

(inner) getList()

This function returns the text layers in the drawing identified by the drawing key and art
Example
var fontList = Drawing.font.getList();
  System.println("There are " + fontList.length + " fonts available");
  System.println("Arial font id is: " +  Drawing.font.getId("Arial"));
Returns:
The list of fonts usable