Font families available in JavaFX 8
Asked Answered
R

2

18

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?

Reidreidar answered 7/9, 2015 at 12:57 Comment(0)
B
31

You can get the list of installed font families by calling javafx.scene.text.Font.getFamilies();.

Belonging answered 7/9, 2015 at 13:32 Comment(0)
N
5

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:

http://www.w3schools.com/cssref/css_websafe_fonts.asp

Nominative answered 7/9, 2015 at 13:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.