📘 Calculates and returns the ascent (the distance from the baseline to the top of the highest character) of the current font.
string to measure
ascent of the text in pixels
q5.draw = function () { background(0.8); textSize(abs(mouseX)); rect(-90, 90, textWidth('A'), -textAscent()); text('A', -90, 90);}; Copy
q5.draw = function () { background(0.8); textSize(abs(mouseX)); rect(-90, 90, textWidth('A'), -textAscent()); text('A', -90, 90);};
📘 Calculates and returns the ascent (the distance from the baseline to the top of the highest character) of the current font.