Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using @font-face rule to load fonts doesn't work properly on Linux

KüroroNov 2 2017 — edited Nov 3 2017

I've started coding my first JavaFX application and it is working perfectly fine on Windows, not until I test it on Linux, I am getting an error (not actually an error) which says:

  Nov 02, 2017 3:28:14 PM com.sun.javafx.css.StyleManager loadStylesheetUnPrivileged
  INFO: Could not load @font-face font [jar:file:/home/kuroro/Documents/java/PackageSigner2/build/output/packagesigner2.jar!/res/fonts/material/icons/MaterialIcons-Regular.ttf]

I'm using the @font-face rule to load a resource font in my application and they're loaded properly on Windows.

My CSS @font-face rule declaration:

  @font-face {
     font-family: "Material Icons";
     src: url("/res/fonts/material/icons/MaterialIcons-Regular.ttf");
   }

Tested it on: Windows 10 64-bit (OK) with JDK8u121, Windows 7 32-bit (OK) with JDK 8u152, and Xubuntu 16.04.3 LTS 32-bit (FAIL) with JDK 8u151.

Any possible solution regarding this issue?

This post has been answered by Küroro on Nov 3 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 1 2017
Added on Nov 2 2017
1 comment
2,464 views