RFR: 8341670: [Text, TextFlow] Public API for Text Layout Info [v23]

Andy Goryachev angorya at openjdk.org
Fri May 2 16:54:56 UTC 2025


On Thu, 1 May 2025 15:39:03 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> I understand the argument for `TextLineInfo`, I guess I'm looking more at `LayoutInfo` here. My question is whether it is really the best choice to sacrifice local consistency within a single class just to have it look more similar to equally inconsistently named methods in another class? Anyway, I just wanted to point this out, that's not a hill for me to die on.
>
> Is the "thickness" of the returned `Rectangle2D` significant? Typically this is a line, meaning that width would be 0 for horizontal text. I presume that the width can be > 0 and that it would do what you expect?

The widths are 0 with the PrismTextLayout.  I thought it'll be easier to package this information into a rectangle than simply return a bunch of values in an array and then try to describe the layout.  It also better in terms of extensibility (e.g. if we ever support vertical layouts).

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1596#discussion_r2071889865


More information about the openjfx-dev mailing list