Returns the loose ascent of the text based on the font's intrinsic metrics.
The fontAscent()
function calculates the ascent of the text using the font's intrinsic metrics (e.g., fontBoundingBoxAscent
). This value represents the space above the baseline that the font inherently occupies, and is useful for layout purposes when an approximate vertical measurement is required.
Examples
Syntax
fontAscent()
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.