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

Add API to return the desktop font

XMLWordPrintable

    • 2d

      JDK provides several logical fonts but these have become very
      static and difficult to update.
      Some apps want to know the desktop font and have resorted
      to code like this :

            WindowsLookAndFeel laf = new WindowsLookAndFeel();
            Font f = (Font)laf.getDefaults().get("Label.font");

      which will not be accessible in JDK 9 due to encapsulation.

      We could add an API that returns not a logical font as such
      but a named physical font that is the font used by the current
      desktop environment.
      Desktops use multiple fonts so it should be the font that
      is "typically" used, if not universally.

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

              Created:
              Updated: