JDK-6459676 : JDK 1.5 should flush metrics caches when using alternate composite fonts
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 5.0u7
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_2.5.1
  • CPU: sparc
  • Submitted: 2006-08-12
  • Updated: 2014-02-27
  • Resolved: 2007-05-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0u12 b01Fixed
Related Reports
Relates :  
Description
Java bug#6232446 for Font.equals in 1.4.2 needs tightening to include the native font pointer has been reproduced in 5.0 version. See the old bug for details to reproduce:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6232446

Comments
EVALUATION The issue in JDK 1.5 is not quite the same. There is not the same native font pointer and the reference to the underlying font is lazily evaluated and can be substituted with the new underlying font when one of the APIs that might trigger this is invoked. The issue in 1.5 is that the metrics cache is not being flushed when this API is called and the cached entry is tied to the public Font instance. Also there are multiple internal metrics caches depending on whether you ask Toolkit, Component or Graphics for a metrics instance. This is not a problem in JDK 6 since the metrics caching was unified under bug id 6246377 and also has code to account for exxactly this scenario.
16-08-2006