In my JavaFX application, the user will have the possibility to choose the font or font family for displaying the menus, labels, combo boxes, check boxes etc. Where can I find the different font families available for JavaFX 8?
Font families available in JavaFX 8
Asked Answered
You can get the list of installed font families by calling javafx.scene.text.Font.getFamilies();
.
Personally I would attach a CSS sheet to your program, in that case you can set the default font family using .root, something like this;
.root{
-fx-font-family: "Courier New";
}
Here are some examples of some websafe fonts you could use in CSS;
http://www.webdesigndev.com/16-gorgeous-web-safe-fonts-to-use-with-css/
And:
© 2022 - 2024 — McMap. All rights reserved.