Using Arial Unicode MS BOLD in JavaFX

江枫思渺然 提交于 2021-01-28 07:54:43

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!