Ascent/descent values were very hard to codify across platforms so we codified that into a single height value which includes the entire height.
What is the equivalent of `Graphics2d.getFontMetrics()` in Codename one?
-
19-07-2023 - |
문제
I'm looking for a way to programatically find the ascent and descent values of the current (truetype) font in Codename one. The codename one Graphics
class doesn't have a getFontMetrics()
method.
Text width can be determined by using Graphics.stringWidth(text)
, height can be queried from the Font
object. But there doesn't seem to be a way to determine ascent and descent values.
Can anybody help?
해결책
제휴하지 않습니다 StackOverflow