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
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
- relates to
-
JDK-8357070 Text layout fails to render surrogate pairs
-
- New
-