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
Just found out one more detail: In JavaFX-8 if you want to have regular and bold variants of the same font you can specify them with two instances of @font-face. Then you can use -fx-font-weight: bold;
@font-face {
font-family: 'Droid Sans';
src: url('DroidSans.ttf');
}
@font-face {
font-family: 'Droid Sans Bold';
src: url('DroidSans-Bold.ttf');
}
.root {
-fx-font-family: 'Droid Sans';
}
.table-row-cell:focused .text {
-fx-font-weight: bold;
}