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

RFE: use fontconfig to locate replacement fallback fonts.


    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 5.0
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • CPU:
    • OS:


      The new "multi-lingual font configuration" support in Tiger (aka JDK 5.0)
      provides for fallback fonts that aren't considered part of the core set
      of font required to support a user's environment based on regional settings.

      The fallback fonts that may be chosen are specified in the JDK's
      fontconfiguration.properties files.

      These chosen fonts are ones we have selected as being the most suitable,
      based on quality, coverage, etc.

      This works fairly well on Solaris and Windows where in almost all cases
      these fonts will be those from the O/S install, and are known and predictable.

      On Linux it may work less well, because there is both variation and
      unpredictable change across versions and releases.
      So whilst JDK would continue to prefer the fonts we specifically identify
      for fallback fonts, if they aren't present then it may be worthwhile to
      locate a suitable alternative from the installed fonts.
      I believe that (at some cost) we could leverage libfontconfig in 2 ways
      (not to be confused with the unfortunately similar JDK term of
      font configuration files)

      1) It could provide a less expensive mechanism for locating the preferred
      font, in case it has moved. This requires augmentation of the Linux
      font configuration files to specify font face name, as is already required
      in some cases to support TTC files. Note that additional such strings will
      increase the size of the font configuration files.
      [[This usage fontconfig could also be considered as a better way to locate
      a "moved" font file for core fonts too. ie better than the current mechanism
      of matching XLFDs to filenames. XLFDs are arguably largely historical in modern
      Gnome (ie GTK) apps as they don't use X11 for text. So ultimately the
      requirement for XLFDs in font configuration files may be obsoleted.]]

      2) In the event that #1 fails, then libfontconfig can be used to locate
      a different font which supports the same script. A way of selecting the best
      match may need some experimentation.


          Issue Links



              • Assignee:
                prr Philip Race
                prr Philip Race
              • Votes:
                0 Vote for this issue
                0 Start watching this issue


                • Created: