0

I am working on an application using JavaFx 8... everything is going forward, except for applying custom font. i am using the following CSS:

@font-face {
    font-family: bmitra;
    src: url('bmitra.ttf');
} 

.table-cell,.table-view .column-header, .label {
    -fx-font-size: 18.0px;
    -fx-font-family: 'bmitra';
}

The CSS is working with default font families, like Tahoma, Arial & etc. The font and the CSS are placed in the same folder, and are both loaded correctly. also the problem is not just for this special font. I tested application with any fonts like Times new Roman, Arial & etc as custom fonts. So what should be the problem? how to correctly setup font for any control? I am using Eclipse on windows os. the style.css and bmitra.ttf are both beside the controller class (com.example.app.view/style.css and com.example.app.view/bmitra.ttf)

Ali sh
  • 464
  • 5
  • 14

0 Answers0