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

Change the mechanism by which JDK loads the platform-specific FontManager class

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 13, 17, 18
    • Fix Version/s: 18
    • Component/s: client-libs
    • Labels:
      None
    • Subcomponent:
      2d
    • Resolved In Build:
      b17
    • CPU:
      generic
    • OS:
      generic

      Description

      sun.font.FontManagerFactory uses reflection to load platform specific sun.font.FontManager class from "sun.font.fontmanager" system property.

      https://github.com/openjdk/jdk/blob/c81690d7166c32caff6ef3a55fe9b157049e2b56/src/java.desktop/share/classes/sun/font/FontManagerFactory.java#L79

      The "sun.font.fontmanager" property can be one of:
      "sun.awt.Win32FontManager"
      "sun.font.CFontManager"
       "sun.awt.X11FontManager"

      sun.font.FontManager is internal JDK class and JDK modularization feature prevents a user from providing custom FontManager class.

      It would be good to avoid using reflection in this case and create corresponding platform specific classes directly.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              alexsch Alexandr Scherbatiy
              Reporter:
              alexsch Alexandr Scherbatiy
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: