PtextDescent
processing
Returns descent of the current font at its current size. This information is useful for determining the height of the font below the baseline. For example, adding the PtextAscent
and PtextDescent
values will give you the total height of the line.
Link to original Processing doc
PtextDescent is available since version 1.0.0.
See also
Signatures
Examples
// @preview image
120 200 '2D' PGraphics
255 Pbackground //white
0xff0000ff Pstroke //blue
0xffff0000 Pfill //red
20 PtextSize //change this, text should be aligned to line
50 'y' STORE
0.8 'scalar' STORE
PtextDescent $scalar * 'a' STORE
0 $y $a + 120 $y $a + Pline
'Warp 10' 10 $y Ptext //coordinates = bottom left
32 PtextSize //change this, text should be aligned to line
150 'y' STORE
0.8 'scalar' STORE
PtextDescent $scalar * 'a' STORE
0 $y $a + 120 $y $a + Pline
'jump' 10 $y Ptext //coordinates = bottom left
Pencode