Skip to Main Content

JavaFx @font-face Linux

3471564May 21 2017 — edited May 21 2017

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

Post Details
Locked due to inactivity on Jun 18 2017
Added on May 21 2017
0 comments
232 views