ADDITIONAL SYSTEM INFORMATION :
Windows 10, OpenJDK 17, JavaFX SDK 19, javafx-controls 20-ea+7 (tried also other combinations, no one worked)
A DESCRIPTION OF THE PROBLEM :
Tifinagh alphabet characters were not rendered in JavaFX controls like Button or Label. Several Fonts were tried which are known to render these characters in an IDE or on console.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Put Tifinagh characters like ⴰⵎⴰⵟⴰⴼ into the text for JavaFX controls like Labels or Buttons.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The characters get rendered.
ACTUAL -
The characters get not rendered, only default symbols were shown.
---------- BEGIN SOURCE ----------
package de.kontext_e.javafx_tifinagh;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.scene.text.Font;
import javafx.scene.text.FontWeight;
import javafx.stage.Stage;
public class App extends Application {
private static final String MESSAGE = "Hello World! " + "ⴰⵎⴰⵟⴰⴼ";
public static void main(String[] args) {
System.out.println(MESSAGE);
launch(args);
}
@Override
public void start(Stage primaryStage) {
primaryStage.setTitle(MESSAGE);
Label label = new Label(MESSAGE);
Button button = new Button();
button.setText("Say "+ MESSAGE);
button.setOnAction(event -> System.out.println(MESSAGE));
// try any font here: Arial, Consolas, Times New Roman...
Font font = Font.font("Arial", FontWeight.NORMAL, 15);
button.setFont(font);
label.setFont(font);
StackPane root = new StackPane();
VBox vBox = new VBox();
vBox.getChildren().addAll(label, button);
root.getChildren().addAll(vBox);
primaryStage.setScene(new Scene(root, 300, 300));
primaryStage.show();
}
}
// see also https://github.com/kontext-e/javafx_tifinagh for a complete Maven project with dependencies
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
No workaround known.
Windows 10, OpenJDK 17, JavaFX SDK 19, javafx-controls 20-ea+7 (tried also other combinations, no one worked)
A DESCRIPTION OF THE PROBLEM :
Tifinagh alphabet characters were not rendered in JavaFX controls like Button or Label. Several Fonts were tried which are known to render these characters in an IDE or on console.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Put Tifinagh characters like ⴰⵎⴰⵟⴰⴼ into the text for JavaFX controls like Labels or Buttons.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The characters get rendered.
ACTUAL -
The characters get not rendered, only default symbols were shown.
---------- BEGIN SOURCE ----------
package de.kontext_e.javafx_tifinagh;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.scene.text.Font;
import javafx.scene.text.FontWeight;
import javafx.stage.Stage;
public class App extends Application {
private static final String MESSAGE = "Hello World! " + "ⴰⵎⴰⵟⴰⴼ";
public static void main(String[] args) {
System.out.println(MESSAGE);
launch(args);
}
@Override
public void start(Stage primaryStage) {
primaryStage.setTitle(MESSAGE);
Label label = new Label(MESSAGE);
Button button = new Button();
button.setText("Say "+ MESSAGE);
button.setOnAction(event -> System.out.println(MESSAGE));
// try any font here: Arial, Consolas, Times New Roman...
Font font = Font.font("Arial", FontWeight.NORMAL, 15);
button.setFont(font);
label.setFont(font);
StackPane root = new StackPane();
VBox vBox = new VBox();
vBox.getChildren().addAll(label, button);
root.getChildren().addAll(vBox);
primaryStage.setScene(new Scene(root, 300, 300));
primaryStage.show();
}
}
// see also https://github.com/kontext-e/javafx_tifinagh for a complete Maven project with dependencies
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
No workaround known.
- relates to
-
JDK-8252091 UI Incorrect shaping of chars in the Unicode Mongolian range (0x1800-0x18FF)
- Open