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

Aramaic issue in LTR orientation

XMLWordPrintable

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

      Some fonts, used by Old Aramaic: 𐤀𐤓𐤌𐤉𐤀; Imperial Aramaic: 𐡀𐡓𐡌𐡉𐡀; appear with bad glyphs when its control (Text, TextField, TextArea, TextFlow) is set in LTR mode with NodeOrientation.LEFT_TO_RIGHT.

      Same glyphs appear correctly when orientation is set to NodeOrientation.RIGHT_TO_LEFT, see attached screenshots).

      The exact text string:
      Old Aramaic: \ud802\udd00\ud802\udd13\ud802\udd0c\ud802\udd09\ud802\udd00; Imperial Aramaic: \ud802\udc40\ud802\udc53\ud802\udc4c\ud802\udc49\ud802\udc40;

      ```
      public class TextArea_Aramaic_8318099 extends Application {

          @Override
          public void start(Stage stage) throws Exception {
              TextArea textArea = new TextArea();
              // also fails when wrap text is off
              textArea.setWrapText(true);
              textArea.setFont(Font.getDefault().font(24.0));
              textArea.setText("Old Aramaic: \ud802\udd00\ud802\udd13\ud802\udd0c\ud802\udd09\ud802\udd00; Imperial Aramaic: \ud802\udc40\ud802\udc53\ud802\udc4c\ud802\udc49\ud802\udc40;");

              CheckBox rtl = new CheckBox("Right-to-Left");
              
              ToolBar tb = new ToolBar(rtl);

              BorderPane bp = new BorderPane();
              bp.setTop(tb);
              bp.setCenter(textArea);
              
              Scene scene = new Scene(bp);
              
              rtl.selectedProperty().addListener((s, p, c) -> {
                  NodeOrientation ori = c ? NodeOrientation.RIGHT_TO_LEFT : NodeOrientation.LEFT_TO_RIGHT;
                  scene.setNodeOrientation(ori);
              });

              stage.setScene(scene);
              stage.setTitle("Aramaic issue JDK-8318099");
              stage.show();
          }
      }
      ```

      Tested on macOS 13.5.2

        1. Screenshot 2023-10-13 at 10.48.49.png
          288 kB
          Andy Goryachev
        2. Screenshot 2023-10-13 at 10.48.54.png
          287 kB
          Andy Goryachev
        3. TextArea_Aramaic_8318099.java
          1 kB
          Andy Goryachev

            prr Philip Race
            angorya Andy Goryachev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: