I have developed a javafx application, in which I want to make use of a custom font. I will use the font just once in the following button:
gui.SanswerButton1.setStyle("-fx-font: 80 Symbola;-fx-base: #17499F;");
What I want is to add this custom font automatically in every machine that runs my javafx application. How is this possible to happen?
You better ship the font with your application jar and then you have 2 options:
@font-face { font-family: Symbola; src: url('Symbola.ttf'); }
@font-face { font-family: Symbola; src: url('Symbola.ttf'); }
Font.loadFont
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.