United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6427770 JLabel with HTML no longer displays non-spacing characters under 1.5.0_06
JDK-6427770 : JLabel with HTML no longer displays non-spacing characters under 1.5.0_06

Details
Type:
Bug
Submit Date:
2006-05-19
Status:
Closed
Updated Date:
2011-03-07
Project Name:
JDK
Resolved Date:
2011-03-07
Component:
client-libs
OS:
windows_xp
Sub-Component:
javax.swing
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
5.0
Fixed Versions:

Related Reports
Backport:
Backport:
Relates:

Sub Tasks

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
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
                                     
2006-05-26
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.
                                     
2006-06-19
SUGGESTED FIX

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



Hardware and Software, Engineered to Work Together