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

Linux : Emoji characters in TextArea are not displayed or displayed as greyscale

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • jfx11, jfx20, 8, jfx21, jfx22, jfx23
    • javafx
    • generic
    • generic

      ADDITIONAL SYSTEM INFORMATION :
      Linux / Ubuntu 22.04, KDE 5.24.7 X11, 5.15.0 x64 / JDK 22, OpenJFX 22


      A DESCRIPTION OF THE PROBLEM :
      Emoji symbols in the TextArea are either not displayed or displayed in greyscale. The number of symbols displayed depends on the emoji font used. To rule out a system misconfiguration problem, any other non-JavaFX editor (tested in Kate, SublimeText, LibreOffice and also QT/KDE text input fields) has no problems displaying emoji.

      Screenshot comparing different fonts is available on SO: https://stackoverflow.com/questions/78813276/is-it-possible-to-display-emoji-inside-javafx-textarea

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run the code attached.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      All emoji are shown in color.
      ACTUAL -
      Emoji are partially displayed (depending on the font) and in greyscale.

      ---------- BEGIN SOURCE ----------
      public class Main extends Application {

          @Override
          public void start(Stage stage) {
              var eta = new TextArea("""
                      ๐Ÿ˜€ ๐Ÿ˜ƒ ๐Ÿ˜„ ๐Ÿ˜ ๐Ÿ˜† ๐Ÿ˜… ๐Ÿ˜‚ ๐Ÿคฃ ๐Ÿฅฒ ๐Ÿฅน ๐Ÿ˜Š ๐Ÿ˜‡ ๐Ÿ™‚ ๐Ÿ™ƒ ๐Ÿ˜‰ ๐Ÿ˜Œ ๐Ÿ˜ ๐Ÿฅฐ ๐Ÿ˜˜ ๐Ÿ˜— ๐Ÿ˜™ ๐Ÿ˜š ๐Ÿ˜‹ ๐Ÿ˜› ๐Ÿ˜ ๐Ÿ˜œ ๐Ÿคช
                      ๐Ÿคจ ๐Ÿง ๐Ÿค“ ๐Ÿ˜Ž ๐Ÿฅธ ๐Ÿคฉ ๐Ÿฅณ ๐Ÿ™‚โ€ ๐Ÿ˜ ๐Ÿ˜’ ๐Ÿ™‚โ€ ๐Ÿ˜ž ๐Ÿ˜” ๐Ÿ˜Ÿ ๐Ÿ˜• ๐Ÿ™ โ˜น๏ธ ๐Ÿ˜ฃ ๐Ÿ˜– ๐Ÿ˜ซ ๐Ÿ˜ฉ ๐Ÿฅบ ๐Ÿ˜ข ๐Ÿ˜ญ ๐Ÿ˜ฎ ๐Ÿ˜ค ๐Ÿ˜ 
                      ๐Ÿ˜ก ๐Ÿคฌ ๐Ÿคฏ ๐Ÿ˜ณ ๐Ÿฅต ๐Ÿฅถ ๐Ÿ˜ฑ ๐Ÿ˜จ ๐Ÿ˜ฐ ๐Ÿ˜ฅ ๐Ÿ˜“ ๐Ÿซฃ ๐Ÿค— ๐Ÿซก ๐Ÿค” ๐Ÿซข ๐Ÿคญ ๐Ÿคซ ๐Ÿคฅ ๐Ÿ˜ถ ๐Ÿ˜ถ ๐Ÿ˜ ๐Ÿ˜‘ ๐Ÿ˜ฌ ๐Ÿซจ ๐Ÿซ  ๐Ÿ™„
                      ๐Ÿ˜ฏ ๐Ÿ˜ฆ ๐Ÿ˜ง ๐Ÿ˜ฎ ๐Ÿ˜ฒ ๐Ÿฅฑ ๐Ÿ˜ด ๐Ÿคค ๐Ÿ˜ช ๐Ÿ˜ต ๐Ÿ˜ต ๐Ÿซฅ ๐Ÿค ๐Ÿฅด ๐Ÿคข ๐Ÿคฎ ๐Ÿคง ๐Ÿ˜ท ๐Ÿค’ ๐Ÿค• ๐Ÿค‘ ๐Ÿค  ๐Ÿ˜ˆ ๐Ÿ‘ฟ ๐Ÿ‘น ๐Ÿ‘บ ๐Ÿคก
                      ๐Ÿ’ฉ ๐Ÿ‘ป ๐Ÿ’€ ๐Ÿ‘ฝ ๐Ÿ‘พ ๐Ÿค– ๐ŸŽƒ ๐Ÿ˜บ ๐Ÿ˜ธ ๐Ÿ˜น ๐Ÿ˜ป ๐Ÿ˜ผ ๐Ÿ˜ฝ ๐Ÿ™€ ๐Ÿ˜ฟ ๐Ÿ˜พ
                      """);

              Scene scene = new Scene(new VBox(eta), 640, 480);
              stage.setScene(scene);
              stage.show();
          }

          public static void main(String[] args) {
              launch(args);
          }
      }
      ---------- END SOURCE ----------

      FREQUENCY : always


            prr Philip Race
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: