在JavaFX中使用Arial Unicode MS BOLD [英] Using Arial Unicode MS BOLD in JavaFX
本文介绍了在JavaFX中使用Arial Unicode MS BOLD的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在我的JavaFX项目中使用Arial Unicode MS字体,效果很好.但是我想要例如标题要大胆.但是我没有使用粗体字体.这里有什么问题?
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?
我在CSS中直接在代码中尝试了
I tried it with css and within the code directly
.bold-font {
-fx-font-family: Arial Unicode MS;
-fx-font-weight: bold;
}
和
label.setFont( Font.font("Arial Unicode MS", FontWeight.BOLD,24));
没有任何效果,当我使用"getFont()"设置后检查字体时,它仍然很正常.
Nothing worked and when i check the font after setting with "getFont()" it is still regular.
推荐答案
我检查了Arial Unicode MS的几种可能性,
i checked few possibilities with Arial Unicode MS and look
选中此
incLab.setStyle("-fx-font-weight: bold; -fx-font-family: Arial Unicode MS; -fx-font-size: 24");
这篇关于在JavaFX中使用Arial Unicode MS BOLD的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文