Is it possible to specify a font using CSS in JavaFX application? I have an FXML scene and the corresponding CSS file. In Java code, it\'s possible to specify a font using t
You were close to the solution:
-fx-font-family: 'Helvetica', Arial, sans-serif;
Try this, it should work fine.
Maybe this could help? (I'm not an expert in JavaFX)
https://forums.oracle.com/forums/thread.jspa?messageID=10107625
EDIT:
Load your font:
@font-face {
font-family: Delicious;
src: url('Delicious-Roman.otf');
}
Use your font with -fx-:
-fx-font-family: 'Delicious';