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
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.
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
Date: 2013-06-04 17:27:56 +0000