RFR: 8319844 : Text/TextFlow.hitTest() is incorrect in RTL orientation [v2]

Andy Goryachev angorya at openjdk.org
Fri Jan 12 17:01:31 UTC 2024


On Thu, 11 Jan 2024 10:15:01 GMT, Karthik P K <kpk at openjdk.org> wrote:

>> In the `getHitInfo()` method of PrismTextLayout, RTL node orientation conditions were not considered, hence hit test values such as character index and insertion index values were incorrect.
>> 
>> Added checks for RTL orientation of nodes and  fixed the issue in `getHitInfo()` to calculate correct hit test values.
>> 
>> Added system tests to validate the changes.
>
> Karthik P K has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Code review changes

There seems to be a weird problem with Text (tested on macOS) in the Monkey Tester.  'Writing Systems' is a multi-line text with a tricky font (which does not get rendered correctly in LTR mode for some reason, but does in RTL).  So if you try to hover over Aramaic line, the hit test info does not get updated:

![Screenshot 2024-01-12 at 08 54 08](https://github.com/openjdk/jfx/assets/107069028/3f3e5fc1-809b-48ac-80c4-1a742e6c147b)

hit test is also not updated over some other areas, so you may want to research this.

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

PR Comment: https://git.openjdk.org/jfx/pull/1323#issuecomment-1889648627


More information about the openjfx-dev mailing list