Hi,

This possible bug is reported here:
https://bugs.openjdk.org/browse/JDK-8322251

Running the code bellow produces incorrect text on Ubuntu 24.04 (still not
released). I would like to fix it, but some hints would be appreciated.

I might be missing a font, but the same text render fine on GTK based
applications.

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TextArea;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

public class TextAreaSample extends Application {

    @Override
    public void start(Stage primaryStage) {
        TextArea textArea = new TextArea();
        textArea.setText("你好,世界");

        StackPane root = new StackPane();
        root.getChildren().add(textArea);

        Scene scene = new Scene(root, 300, 200);
        primaryStage.setTitle("Test");
        primaryStage.setScene(scene);

        primaryStage.show();
    }

    public static void main(String[] args) {
        launch(TextAreaSample.class, args);
    }
}


Ubuntu 22.04
[image: image.png]

Ubuntu 24.04 (nightly build):
[image: image.png]

-- Thiago


import javafx.application.Application;
import javafx.scene.Scene;

import javafx.scene.control.TextArea;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

public class TextAreaSample extends Application {

    @Override
    public void start(Stage primaryStage) {
        TextArea textArea = new TextArea();
        textArea.setText("你好,世界");

        StackPane root = new StackPane();
        root.getChildren().add(textArea);

        Scene scene = new Scene(root, 300, 200);
        primaryStage.setTitle("Test");
        primaryStage.setScene(scene);

        primaryStage.show();
    }

    public static void main(String[] args) {
        launch(TextAreaSample.class, args);
    }
}

Reply via email to