JDK-8297119 : Fallback to .otf font on linux not working
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: jfx17
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2022-11-11
  • Updated: 2022-11-16
  • Resolved: 2022-11-16
Related Reports
Duplicate :  
Description
ADDITIONAL SYSTEM INFORMATION :
Linux Mint 20.03
JDK 11.014.1

A DESCRIPTION OF THE PROBLEM :
Setting up a chinese fallback .otf font with fontconfig tool on linux has no effect. Chinese chars won't show only the empty rectangle shows. 
Fallback to a .ttf font works. On Linux Mint JFX falls back to /usr/share/fonts/truetype/droid/DroidSansFallbackFull.ttf for chinese chars.

Deleting this .ttf font result in showing the rectangle. Providing any .otf font from here https://github.com/googlefonts/noto-cjk/tree/main/Sans/OTF/SimplifiedChinese as a replacement fallback for chinese does not work. "fc-list" list the new .otf font after configuration with fontconfig.
Providing an other .ttf font for chinse as fallback does work.

Loading the .otf font with Font.load and referencing the font in XML with
.root{
    -fx-font: 18 "Noto Sans CJK SC Light";
}

does work.






FREQUENCY : always



Comments
Duplicate of JDK-8264703
16-11-2022