Name

textAscent()

Examples
base = height * 0.75
scalar = 0.8  # Different for each font
textSize(32)  # Set initial text size
a = textAscent() * scalar  # Calc ascent
line(0, base - a, width, base - a)
text("dp", 0, base)  # Draw text on baseline
textSize(64)  # Increase text size
a = textAscent() * scalar  # Recalc ascent
line(40, base - a, width, base - a)
text("dp", 40, base)  # Draw text on baseline
Description
Syntax
Related textDescent()
Updated on Wed Jan 18 17:32:21 2017.
Creative Commons License