I have a problem making the text italic to the Arabic texts, It does not work, I also tried different types of fonts, but none of them works, Here is the code:
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 suggestions? I would be grateful