Returns the descent of the text.
The textDescent()
function calculates the distance from the baseline to the lowest point of the current font. This value represents the descent, which, when combined with the ascent (from textAscent()
), determines the overall vertical span of the text. If a text string is provided as an argument, the descent is calculated based on that specific string; otherwise, the descent of the current font is returned.
Examples
Syntax
textDescent([txt])
Parameters
Returns
Related References
textToContours
Returns an array of arrays of points outlining a string of text written using the font.
textToModel
Converts text into a 3D model that can be rendered in WebGL mode.
textToPaths
Returns a flat array of path commands that describe the outlines of a string of text.
textToPoints
Returns an array of points outlining a string of text written using the font.