Skip to content

Commit

Permalink
adding note about textFont return type closes #4926
Browse files Browse the repository at this point in the history
  • Loading branch information
lmccart committed Mar 10, 2021
1 parent 7fda84a commit 02c7eb1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/typography/loading_displaying.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,14 @@ p5.prototype.text = function(str, x, y, maxWidth, maxHeight) {

/**
* Sets the current font that will be drawn with the <a href="#/p5/text">text()</a> function.
* If textFont() is called without any argument, it will return the current font if one has
* been loaded already. If not, it will return the name of the default font as a string.
* If textFont() is called with a font to load, it will return the p5 object.
*
* <b>WEBGL</b>: Only fonts loaded via <a href="#/p5/loadFont">loadFont()</a> are supported.
*
* @method textFont
* @return {Object} the current font
* @return {Object} the current font / p5 Object
*
* @example
* <div>
Expand Down

0 comments on commit 02c7eb1

Please sign in to comment.