diff --git a/docs/parameterData.json b/docs/parameterData.json index 3fc79dbeed..d9747b17a5 100644 --- a/docs/parameterData.json +++ b/docs/parameterData.json @@ -2017,7 +2017,8 @@ [ "LEFT|CENTER|RIGHT", "TOP|BOTTOM|CENTER|BASELINE?" - ] + ], + [] ] }, "textAscent": { @@ -2038,7 +2039,8 @@ "overloads": [ [ "Number" - ] + ], + [] ] }, "textFont": { @@ -2046,7 +2048,8 @@ [ "p5.Font|String|Object", "Number?" - ] + ], + [] ] }, "textSize": { diff --git a/src/type/textCore.js b/src/type/textCore.js index 28e3e8888a..2a45168780 100644 --- a/src/type/textCore.js +++ b/src/type/textCore.js @@ -224,10 +224,13 @@ function textCore(p5, fn) { * accepts the following values for `vertAlign`: `TOP`, `BOTTOM`, `CENTER`, * or `BASELINE`. * + * Calling `textAlign()` without arguments returns the current alignment settings. + * * @method textAlign * @for p5 - * @param {LEFT|CENTER|RIGHT} horizAlign horizontal alignment + * @param {LEFT|CENTER|RIGHT} [horizAlign] horizontal alignment * @param {TOP|BOTTOM|CENTER|BASELINE} [vertAlign] vertical alignment + * @returns {Object} If no arguments are provided, returns an object with current horizontal and vertical alignment * @example *
@@ -537,12 +540,15 @@ function textCore(p5, fn) {
* The second parameter, `size`, is optional. It sets the font size in pixels.
* This has the same effect as calling textSize().
*
+ * Calling `textFont()` without arguments returns the current font.
+ *
* Note: `WEBGL` mode only supports fonts loaded with
* loadFont().
*
* @method textFont
- * @param {p5.Font|String|Object} font The font to apply
+ * @param {p5.Font|String|Object} [font] The font to apply
* @param {Number} [size] An optional text size to apply.
+ * @returns {String|p5.Font} If no arguments are provided, returns the current font
* @for p5
*
* @example