Prior to the emoji support for macOS added by JDK-8290866, some emojis didn't render at all on macOS. In at least one case, the reported spacing was correct even though nothing was drawn.
Now JavaFX renders the base emoji correctly, but if modifiers are added, it doesn't interpret the modifier as being part of the emoji, and both the spacing and rendering is wrong.
There is a failing WebKit DRT test -- LayoutTests/fast/text/emoji-with-joiner.html -- as a result (it was only accidentally passing before because the test was ignoring what was actually being rendered).
To reproduce this, run either the attach test program:
$ java EmojiTest
Or run HelloWebView with the attached html file:
$ java HelloWebView file:emoji-test.html
Both will render 3 sequences of emoji on three lines. The first is a sequence of identical code points of a face (female). This renders correctly via a Text node and WebView. The second is a sequence of emoji with different skin tones (still female), this does not render correctly and there is some extra spacing. The third is a sequence of emoji with a male modifier and different skin tones. It also does not render correctly and there is more extra spacing.
In addition to the programs, I have attached three images: the output of EmojiTest, the output of emoji-test.html run with HelloWebView, and the output of emoji-test.html run with Safari.
Now JavaFX renders the base emoji correctly, but if modifiers are added, it doesn't interpret the modifier as being part of the emoji, and both the spacing and rendering is wrong.
There is a failing WebKit DRT test -- LayoutTests/fast/text/emoji-with-joiner.html -- as a result (it was only accidentally passing before because the test was ignoring what was actually being rendered).
To reproduce this, run either the attach test program:
$ java EmojiTest
Or run HelloWebView with the attached html file:
$ java HelloWebView file:emoji-test.html
Both will render 3 sequences of emoji on three lines. The first is a sequence of identical code points of a face (female). This renders correctly via a Text node and WebView. The second is a sequence of emoji with different skin tones (still female), this does not render correctly and there is some extra spacing. The third is a sequence of emoji with a male modifier and different skin tones. It also does not render correctly and there is more extra spacing.
In addition to the programs, I have attached three images: the output of EmojiTest, the output of emoji-test.html run with HelloWebView, and the output of emoji-test.html run with Safari.
- relates to
-
JDK-8304041 [WebView] Text on the left and right of emoji is not visible
- Open
-
JDK-8290866 Apple Color Emoji turns gray after JavaFX version 18
- Resolved
-
JDK-8309565 [Text] Enhance support for user-perceived characters (grapheme clusters)
- Open