I need to get distance from baseline of one line to baseline to next text line, the same as it is laid out in JTextArea. For that, I have only a font with specified font size.
My problem is that on font, I can only get LineMetrics or FontMetrics, and they both have different sizes of line (getAscent/getHeight/getDescent) depending on the current text - for example, if there is letter f
, the ascent is bigger, and if there is g
, I have descent.
Is there a way to get "global" font height property? So I will be able to draw text on Graphics2D properly.