JDK-7124223 : [macosx] Regression test failure with new exception, when glyph is positioned explicitly
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: os_x
  • CPU: generic
  • Submitted: 2011-12-23
  • Updated: 2012-09-25
  • Resolved: 2012-02-29
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.
JDK 7 JDK 8
7u4 b13Fixed 8Fixed
Related Reports
Duplicate :  
Description
http://java.net/jira/browse/MACOSX_PORT-754 submitted 2011/11/29 by Yuri Nesterenko
This closed test used to fail in b218 reporting that explicitly set position not used. In b219, however, it is a consistent ArrayIndexOutOfBoundsException: -2. Looks like it may be useful to mention it now.
I'm attaching the test here.
Build: b219
closed/java/awt/print/PrinterJob/GlyphPositions.java

Comments
SUGGESTED FIX http://cr.openjdk.java.net/~bae/7124223/webrev/ http://hg.openjdk.java.net/jdk7u/jdk7u-dev/jdk/rev/b3d6b8a43aca
15-02-2012

EVALUATION Note that PathGrapics uses a glyph codes as a indexes in an array in order to provide a mapping from glyph codes back to unicode characters. So, it assumes that glyph code is not negative. However it is not true in case of macosx: if there is no glyph in a font for some character, then macosx font support machinery returns negative unicode char in order to indicate that this char requires a substitution (CoreTextSupport.m, lines 92 - 126). Suggested fix just ignores negative glyph codes in PathGrapics. See also comments section.
15-02-2012