Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8297119

Fallback to .otf font on linux not working

XMLWordPrintable

    • generic
    • generic

      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


            pnarayanaswa Praveen Narayanaswamy
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: