How to load own font from CSS file into JavaFX application (I'm using now JDK 8u45)

424 views Asked by At

When I used JDK 8u11 I could see in application text in my own font. But when I upgraded my Java to JDK 8u45 I see that my font wasn't loaded. I can't see any warning in my console in Eclipse (I'm using Luna). I used this CSS, but now it is not working.

@font-face {
    font-family: 'My-Font';
    src: url('../font/My-Font.otf');
}

Can anybody help me?

0

There are 0 answers