Set the font family.
Important: The font name must be quoted if it contains certain combinations of digits or special characters:
Text.setFont('"Press Start 2P"');
Equally, if you wish to provide a list of fallback fonts, then you should ensure they are all quoted properly, too:
Text.setFont('Georgia, "Goudy Bookletter 1911", Times, serif');
name | type | description |
---|---|---|
family | string |
The font family. |
This Text object.