Forum Stats

  • 3,837,916 Users
  • 2,262,308 Discussions
  • 7,900,432 Comments

Discussions

JavaFx @font-face Linux

3471564
3471564 Member Posts: 1
edited May 21, 2017 5:48PM in JavaFX 2.0 and Later

Hello, I have a problem with loading fonts in a JavaFx program at Linux. On Windows the same program works and loads all fonts.

This is the way I try to load the font:

@font-face {

    src: url('fonts/Barrio-Regular.ttf');

}

But I get this error:

Mai 21, 2017 11:45:37 PM com.sun.javafx.css.StyleManager loadStylesheetUnPrivileged

INFO: Could not load @font-face font [file:/home/medieninf/workspace/FontTest/bin/presentation/fonts/Barrio-Regular.ttf]

I am using Java 1.8 and JavaFx 2.4, I hope you can help me!

You can find my code here: https://www.dropbox.com/s/p9njozcue59yoeb/FontTest.zip?dl=0
At Linux it doesn't work and at Windows it works, do you know why?

main.PNG

gui.PNG

layout.PNG

guicontroller.PNG

css.PNG

This discussion has been closed.