-
Bug
-
Resolution: Fixed
-
P2
-
8
The following test case shows two Text nodes with the three first letters in the Hebrew alphabet. The first node incorrectly shows the characters rendered from left-to-right (though not mirrored).
The second node consists of two lines, and this node displays both lines correctly.
See attached image.
import javafx.application.*;
import javafx.scene.*;
import javafx.scene.layout.*;
import javafx.scene.text.*;
import javafx.stage.*;
public class Hebrew extends Application {
public static void main(String[] args) { launch(args); }
@Override public void start(Stage stage) {
VBox rootNode = new VBox(10);
rootNode.setStyle("-fx-padding: 20;");
Text text = new Text();
text.setText("\u05D0\u05D1\u05D2"); // alef bet gibel
rootNode.getChildren().add(text);
text = new Text();
text.setText("\u05D0\u05D1\u05D2\n\u05D0\u05D1\u05D2"); // Two lines
rootNode.getChildren().add(text);
Scene scene = new Scene(rootNode);
stage.setScene(scene);
stage.show();
}
}
The second node consists of two lines, and this node displays both lines correctly.
See attached image.
import javafx.application.*;
import javafx.scene.*;
import javafx.scene.layout.*;
import javafx.scene.text.*;
import javafx.stage.*;
public class Hebrew extends Application {
public static void main(String[] args) { launch(args); }
@Override public void start(Stage stage) {
VBox rootNode = new VBox(10);
rootNode.setStyle("-fx-padding: 20;");
Text text = new Text();
text.setText("\u05D0\u05D1\u05D2"); // alef bet gibel
rootNode.getChildren().add(text);
text = new Text();
text.setText("\u05D0\u05D1\u05D2\n\u05D0\u05D1\u05D2"); // Two lines
rootNode.getChildren().add(text);
Scene scene = new Scene(rootNode);
stage.setScene(scene);
stage.show();
}
}
- duplicates
-
JDK-8125746 TextArea/TextField, pasted Arabic/Hebrew text is displayed from left to right.
-
- Closed
-