JDK-6427770 : JLabel with HTML no longer displays non-spacing characters under 1.5.0_06
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2006-05-19
  • Updated: 2011-03-07
  • Resolved: 2011-03-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.
JDK 6 JDK 7
6u2Fixed 7 b03Fixed
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
Java Web Start 1.5.0_06
Using JRE version 1.5.0_06 Java HotSpot(TM) Client VM

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
When I use HTML formatting in the text of a JLabel that includes a non-spacing character, the diacritic no longer shows under 1.5.0_06. This showed correctly under 1.5.0_04.

This part of our application is used to enter system diacritic characters. We use the html formatting to distinguish the diacritic the user is entering vs the sample character it will be placed over/under.

jlabel.setText ("<html><font color='#AFA081'>o</font>\u0300");

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
jlabel.setText ("<html><font color='#AFA081'>o</font>\u0300");
                

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
on 1.5.0_04 this showed a light brown "o" with a black diacritic (Combining Grave Accent)
ACTUAL -
on 1.5.0_06 this shows only the light brown "o" with no diacritic (Combining Grave Accent)

REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
do not use html formatting

Release Regression From : 5.0u4
The above release value was the last known release where this 
bug was known to work. Since then there has been a regression.

Comments
SUGGESTED FIX http://javaweb.sfbay/jcg/1.6.0-mustang/swing/6427770/
20-07-2006

EVALUATION This bug appears if the GlyphView contains *only* combining marks (or other symbols with x-advance == 0). The paintChild() method not called for such views from javax.swing.text.BoxView.paint() because view allocation rectangle doesn't intersect with the clipping rectangle according to Rectangle.intersects() method.
19-06-2006

EVALUATION This does appear to be a Swing issue. I've determined the following: - this doesn't happen if the <font> tags are removed or plain test is used - this doesn't happen with Font2DTest - the problem goes away if more letters are added at the end of the content
26-05-2006