JDK-8273896 : Change the mechanism by which JDK loads the platform-specific FontManager class
  • Type: CSR
  • Component: client-libs
  • Sub-Component: 2d
  • Priority: P4
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 18
  • Submitted: 2021-09-16
  • Updated: 2021-09-23
  • Resolved: 2021-09-23
Related Reports
CSR :  
Relates :  
Relates :  
Description
Summary
-------
Remove the sun.font.fontmanager system property, which is used to name the platform-specific internal subclass of sun.font.FontManager

Problem
-------

The sun.font.fontmanager system property is used to specify the name of the implementation class for the FontManager which is created by reflection. The platform over-ride value was hard-coded into the platform-specific code to initialize the system properties.

This implies that FontManager creation is pluggable which it is not. 
sun.font.FontManager is an internal class and since jdk 9 it is not possible to provide FontManager subclass outside java.desktop module due to the module system encapsulation.

Solution
--------

Remove the sun.font.fontmanager system property which is used to specify the name of the platform implementation class.

It is replaced by a mechanism entirely internal to the java.desktop module which does not require setting a system property.

Specification
-------------

Remove the sun.font.fontmanager system property
Comments
Moving to Approved. I'll leave it to the client team's discretion as to whether or not this issue merits a release note.
23-09-2021

Should something be done from my side? Do I need to move the CSR to proposed or finalized state?
21-09-2021

This should be backportable, so I expect this needs to cover say 11u and 17u as well ..
16-09-2021