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
Number: The loose ascent value in pixels.
Notice any errors or typos? Please let us know. Please feel free to edit src/type/textCore.js and open a pull request!