I added a custom font to my project in the src/main/resources( RobotoMono.ttf) folder . Then I try to load it from my css file as follows:
@font-face {
font-family: 'RobotoMono';
src: url('RobotoMono.ttf');
}
but when I try to install this font on something, it does not work:
.column-header-label {
-fx-label-padding: 0;
-fx-text-overrun: clip;
-fx-font-family: 'RobotoMono';
}
If I set the font to something that is present on my system, I see that the font is changing, but the one that is turned on by me does not work.
What am I doing wrong?
source
share