JDK-8297334 : Tifinagh characters not rendered properly in JavaFX
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version:
    8,openjfx11,openjfx17,openjfx19,openjfx20 8,openjfx11,openjfx17,openjfx19,openjfx20
  • Priority: P3
  • Status: Closed
  • Resolution: Not an Issue
  • OS: generic
  • CPU: generic
  • Submitted: 2022-11-18
  • Updated: 2022-12-02
  • Resolved: 2022-12-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdResolved
Related Reports
Relates :  
Description
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.


Comments
// try any font here: Arial, Consolas, Times New Roman... Well I did, I tried Ebrima which is the Windows font that supports Tifinagh and it works fine. It won't work with "any" font because few fonts support this writing system. The ones the submitter enumerates do not. Ebrima is the only standard Windows font that supports it.
02-12-2022

Checked with attached testcase in Windows 10, Issue is reproducible <attached screenshot for reference> Test Result: ========= 8u351: Fail openjfx11: Fail openjfx17: Fail openjfx19: Fail openjfx20ea7: Fail
21-11-2022