JDK-8008535 : JDK7 Printing : CJK and Latin Text in a string overlap.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 7u13,7u15,8
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows
  • CPU: generic
  • Submitted: 2013-02-20
  • Updated: 2014-12-04
  • Resolved: 2013-05-24
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
7u40Fixed 8 b93Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Description
When printing text by Java7, some letters are overlapped.
For example, graphics2d.drawString(Japanse+English) causes the
Japanese letters and English letters overlapping.
This is a regression from Java6, because Java6 doesn't have 
this problem.

Comments
Verified b94!
18-06-2013

I can reproduce this from JDK 7 b08 onwards. My guess is that its due to a bug in the fix for 6425068 : Mismatch between the drawing width and font metrics One part of that fix was to assign glyph positions in certain cases. If we aren't adding the start position of a new run then you would get this overlapping
20-02-2013

To reproduce the bug, 1. Compile DrawPanel.java, Print.java and Frame.java 2. Exec Print.java - Japanese text and English text overlap (see print_bug.png attached) 3. Exec Frame.java - looks work fine. DrawPanel.java have Japanese strings in the source in UTF-8 encoding. Please compile it on UTF-8 locale.
20-02-2013