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

[Linux] Use /etc/os-release values for font configuration file names

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Unresolved
    • Icon: P4 P4
    • 26, tbd
    • client-libs
    • None
    • 2d
    • behavioral
    • low
    • Hide
      font configuration files are not usually used today, as the JDK generates an equivalent at run time. And where used, they are usually part of the JDK, which can ensure that the naming of the files works for the current JDK.
      It is extremely rare that "end user" fontconfig files will be configured for a JDK installation and whilst they may now in some cases need to rename the files, the required naming will now be clearer and standardised.
      Show
      font configuration files are not usually used today, as the JDK generates an equivalent at run time. And where used, they are usually part of the JDK, which can ensure that the naming of the files works for the current JDK. It is extremely rare that "end user" fontconfig files will be configured for a JDK installation and whilst they may now in some cases need to rename the files, the required naming will now be clearer and standardised.
    • Other
    • JDK

      Summary

      On startup of the AWT desktop toolkit on Linux, the /etc/os-release file will be examined to determine naming of font configuration files, replacing previous hard-coded mappings and other mechanisms.

      Problem

      Since JDK 1.1 font properties files embedded in the JDK have been used to specify a mapping to platform fonts to be used for AWT logical fonts. The naming of the files themselves has historically depended on hard-coded mappings such as "solaris" and "Redhat" which are set depending on whether (eg) there is an /etc/redhat-release file. The result is that only by examination of JDK source can you know what names will be used and how they are discovered.

      Solution

      For well over 10 years now /etc/os-release has been a standard Linux file in a properties format where a distro will store as "ID" a machine-readable OS name and a machine readable "VERSION_ID". JDK can read these, and does not need to interpret them but can use them directly to replace the existing mechanisms and anyone can determine the names to be used by examining this standard file.

      Specification

      Use the ID and VERSION_ID fields to determine the name of a font configuration file. Specifically it will be "fontconfig.$ID.$ID_VERSION.properties" Except that if any spaces will be replaced with "_", however this is unlikely, as spaces are expected in these specific fields.

            prr Philip Race
            prr Philip Race
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: