Reference for Processing version 1.0.1+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.

Name

textAscent()

Examples
example pic
PFont font;
font = loadFont("FFScala-32.vlw"); 
textFont(font);

textSize(32); 
float ascent = textAscent();
text("dp", 0, 70);
line(0, 70-ascent, 100, 70-ascent); 

textSize(64);
ascent = textAscent();
text("dp", 35, 70);
line(35, 70-ascent, 100, 70-ascent);
Description Returns ascent of the current font at its current size. This information is useful for determining the height of the font above the baseline. For example, adding the textAscent() and textDescent() values will give you the total height of the line.
Syntax
textAscent()
Returns Float
Usage Web & Application
Related textDescent()
Updated on November 22, 2008 08:39:26pm PST

Creative Commons License