问题
I want to use the font Arial Unicode MS in my JavaFX project which works fine. But i want e.g. the headlines to be bold. But I don't get the bold font working. What's the probleme here?
I tried it with css and within the code directly
.bold-font {
-fx-font-family: Arial Unicode MS;
-fx-font-weight: bold;
}
and
label.setFont( Font.font("Arial Unicode MS", FontWeight.BOLD,24));
Nothing worked and when i check the font after setting with "getFont()" it is still regular.
回答1:
i checked few possibilities with Arial Unicode MS and look
check this
incLab.setStyle("-fx-font-weight: bold; -fx-font-family: Arial Unicode MS; -fx-font-size: 24");
来源:https://stackoverflow.com/questions/56731762/using-arial-unicode-ms-bold-in-javafx