On Tue, 6 Jun 2023 20:14:41 GMT, Andy Goryachev <ango...@openjdk.org> wrote:
>> This case is same as the one which we saw with red heart as the emoji >> sequence mentioned here is also a U+FE0F Variation Selector-16 character. >> Since it exhibits different behavior in different platforms we decided to >> remove it. >> >> I compared the insertion index calculated for these emojis with the >> insertion index calculated for red heart emoji. The insertion index >> calculated looks to be correct for the above given emojis. It is considered >> as 2 characters if color is also present else it is considered as single >> character. >> For me it is giving correct caret position as well in the Monkey tester. >> >> I found strange behavior when I tried to add heart emojis (with and without >> color) along with the `CLUSTERS` variable present in Monkey Tester so that >> it gets displayed when Rich Text option is selected. >> When `CLUSTERS = "❤️❤❤️"`, emojis are displayed properly. >> <img width="658" alt="image" >> src="https://github.com/openjdk/jfx/assets/26969459/f3de5d1d-ad8c-42a6-8284-01916dfd37a8"> >> >> When `CLUSTERS = "☝🏿☝🏿☝🏿🤦🏼♂️❤️❤❤️";`, following sequence is displayed. >> <img width="532" alt="image" >> src="https://github.com/openjdk/jfx/assets/26969459/6eaa67b8-6fa1-475f-82bd-e9c48240b1c1"> >> >> This looks like a separate issue. Please let me know your thoughts on this. > > @karthikpandelu : > 1. you are right, multiple symbols and a failed test are due to lack of > proper handling of grapheme clusters in fx. I don't think we have a ticket, > so created JDK-8309565 for that > 2. your latest fix uncovered a problem in my RichTextArea code, so thank you! > > The new code passes all my tests in the MonkeyTester and RichTextArea. Than you @andy-goryachev-oracle for the detailed review and feedback. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1091#discussion_r1220851313