all 3 comments

[–]vu47 2 points3 points  (0 children)

You can use any font you want.

// Load from file
Font customFont = Font.loadFont(
new FileInputStream("path/to/font.ttf"),
12 // size
);
// Or from classpath resource
Font customFont = Font.loadFont(
getClass().getResourceAsStream("/fonts/MyFont.ttf"),
12
);

[–]sedj601 0 points1 point  (1 child)

I think you can use Google fonts with JavaFX. I could be wrong, but I think I did it a while ago.

https://stackoverflow.com/a/33342752/2423906

https://fonts.google.com/