RFR: 8341670: [Text, TextFlow] Public API for Text Layout Info [v31]
Kevin Rushforth
kcr at openjdk.org
Tue Jun 10 17:15:41 UTC 2025
On Thu, 5 Jun 2025 21:31:59 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> modules/javafx.graphics/src/main/java/javafx/scene/text/TextLineInfo.java line 42:
>>
>>> 40: * <li>
>>> 41: * {@code minY} - the ascent of the line (negative).
>>> 42: * The ascent of the line is the max ascent of all fonts in the line.
>>
>> Shouldn't that be "glyphs" not "fonts"?
>
> This definition is copied from `com.sun.javafx.scene.text.TextLine::getBounds` L58.
> I'll let Phil confirm that, but since it's a max ascent, it might be a function of the font rather than the particular glyphs.
I asked Phil offline and he confirmed that this should be "font" not "glyph", which makes sense, since what you want to know is how tall the line should be to accommodate any glyph that you might display with that font.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1596#discussion_r2138395298
More information about the openjfx-dev
mailing list