Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions docs/parameterData.json
Original file line number Diff line number Diff line change
Expand Up @@ -2017,7 +2017,8 @@
[
"LEFT|CENTER|RIGHT",
"TOP|BOTTOM|CENTER|BASELINE?"
]
],
[]
]
},
"textAscent": {
Expand All @@ -2038,15 +2039,17 @@
"overloads": [
[
"Number"
]
],
[]
]
},
"textFont": {
"overloads": [
[
"p5.Font|String|Object",
"Number?"
]
],
[]
]
},
"textSize": {
Expand Down
10 changes: 8 additions & 2 deletions src/type/textCore.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
* <div>
* <code>
Expand Down Expand Up @@ -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 <a href="#/p5/textSize">textSize()</a>.
*
* Calling `textFont()` without arguments returns the current font.
*
* Note: `WEBGL` mode only supports fonts loaded with
* <a href="#/p5/loadFont">loadFont()</a>.
*
* @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
Expand Down
Loading