/** * Returns the ascent of the current font at the current size. * This is a method, rather than a variable inside the PGraphics object * because it requires calculation. */ public float textAscent() { if (textFont == null) { defaultFontOrDeath("textAscent"); } return textFont.ascent() * textSize; }
/** * ( begin auto-generated from textAscent.xml ) * * 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 <b>textAscent()</b> and <b>textDescent()</b> values * will give you the total height of the line. * * ( end auto-generated ) * * @webref typography:metrics * @see PGraphics#textDescent() */ public float textAscent() { if (textFont == null) { defaultFontOrDeath("textAscent"); } return textFont.ascent() * textSize; }