Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8303494

[macos] Incorrect rendering and spacing of emojis with skin tone modifiers

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4
    • tbd
    • jfx21
    • javafx
    • None

    Description

      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.

      Attachments

        1. emoji-test.html
          0.9 kB
        2. EmojiTest.java
          2 kB
        3. EmojiTest.png
          EmojiTest.png
          321 kB
        4. emoji-test - Safari.png
          emoji-test - Safari.png
          385 kB
        5. emoji-test - WebView.png
          emoji-test - WebView.png
          243 kB

        Issue Links

          Activity

            People

              prr Philip Race
              kcr Kevin Rushforth
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: