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

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

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 18
    • 13, 17, 18
    • client-libs
    • None
    • 2d
    • b17
    • generic
    • generic

      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.

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

              Created:
              Updated:
              Resolved: