Skip to content

Commit a5d3fcf

Browse files
authored
Merge pull request #1917 from processing/dhowe-patch-2
Minor API change: textFont() should return current font
2 parents 7fa2c49 + 4394b5a commit a5d3fcf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/typography/loading_displaying.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ p5.prototype.text = function(str, x, y, maxWidth, maxHeight) {
7575
* @method textFont
7676
* @param {Object|String} f a font loaded via loadFont(), or a String
7777
* representing a <a href="https://mzl.la/2dOw8WD">web safe font</a> (a font
78-
* that is generally available across all systems).
79-
* @return {Object} this
78+
* that is generally available across all systems)
79+
* @return {Object|String} the current font
8080
* @example
8181
* <div>
8282
* <code>
@@ -134,7 +134,7 @@ p5.prototype.textFont = function(theFont, theSize) {
134134
return this._renderer._applyTextProperties();
135135
}
136136

137-
return this;
137+
return this._renderer._textFont;
138138
};
139139

140140
module.exports = p5;

0 commit comments

Comments
 (0)