RFR: JDK-8314215 Trailing Spaces before Line Breaks Affect the Center Alignment of Text [v10]
John Hendrikx
jhendrikx at openjdk.org
Wed Feb 7 16:00:03 UTC 2024
On Tue, 6 Feb 2024 23:32:25 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> John Hendrikx has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix test comment
>
> one thing: you may sync up with the latest master branch, that's the configuration I am testing.
@andy-goryachev-oracle
I'm not quite seeing what you are seeing. Here is a screenshots of `LOGICAL` setting with the text `The quick brown fox jumps over the lazy dog`; notice that there is a horizontal scroll bar -- that looks incorrect:

Now, for the `VISUAL` setting it is a bit hard to see if it is doing the right thing because the `Text` node is lacking any kind of border to see where the actual bounds are. However, I do clearly see it responding to underline on/off, so it is taking that into account somehow (which makes sense for `VISUAL`)
`VISUAL` with underline on (notice scroll bar):

And off (notice scroll bar is gone):

So, it seems that:
- Logical bounds still have a bug where the `Text` is getting a scroll bar
- Visual bounds seem to be what you'd expect (I see no bugs -- text is correctly aligned with respect to **other** lines, but there may be trailing spaces that take up additional visual space which results in the overall alignment to be off (ie. right aligned text is not touching the right most edge, since there are spaces there, but **only** when strike through or underline is on (!!) ) -- again it is bit hard to tell as there is no border to see where the visual bounds really are -- you have to look at the horizonal scroll bar :)
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1236#issuecomment-1932352725
More information about the openjfx-dev
mailing list