Sets the font used by the text() function.
The first parameter, font, sets the font. textFont() recognizes either a p5.Font object or a string with the name of a system font. For example, 'Courier New'.
The second parameter, size, is optional. It sets the font size in pixels. This has the same effect as calling textSize().
Note: WEBGL mode only supports fonts loaded with loadFont().
Examples
Syntax
textFont()
textFont(font, [size])
Returns
Object: current font or p5 Object.
This page is generated from the comments in src/typography/loading_displaying.js . Please feel free to edit it and submit a pull request!