I'm having an issue trying to italicize Arabic text, It just won't work, I've experimented with different fonts as well, but none seem to be working, Here's the code snippet:
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.AnchorPane;
import javafx.scene.text.Text;
import javafx.stage.Stage;
public class JavafxApp extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) {
var pane = new AnchorPane();
var text = new Text("عربي English");
text.setLayoutX(50);
text.setLayoutY(100);
text.setStyle("-fx-font-style: italic; -fx-font-size: 18; -fx-font-
family : Simplified Arabic;");
pane.getChildren().add(text);
var scene = new Scene(pane, 200, 200);
primaryStage.setScene(scene);
primaryStage.show();
}
}
Any advice or solutions? I would really appreciate it