United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-4615396 Swing: chinese text cann't show when select 'WindowsLookAndFeel'
JDK-4615396 : Swing: chinese text cann't show when select 'WindowsLookAndFeel'

Details
Type:
Bug
Submit Date:
2001-12-18
Status:
Closed
Updated Date:
2002-06-20
Project Name:
JDK
Resolved Date:
2002-04-26
Component:
client-libs
OS:
windows_2000
Sub-Component:
javax.swing
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
1.4.0
Fixed Versions:
1.4.1 (hopper)

Related Reports
Duplicate:
Duplicate:
Duplicate:
Duplicate:
Duplicate:
Duplicate:

Sub Tasks

Description

Name: gm110360			Date: 12/18/2001


FULL PRODUCT VERSION :
java version "1.4.0-beta3"
Java(TM) 2 Runtime Environment, Standard Edition (build
1.4.0-beta3-b84)
Java HotSpot(TM) Client VM (build 1.4.0-beta3-b84, mixed
mode)

FULL OPERATING SYSTEM VERSION :
Microsoft Windows 2000 [Version 5.00.2195],Chinese
simplified edtion.
service packs: SP2.



EXTRA RELEVANT SYSTEM CONFIGURATION :
Microsoft Office 2000, English edtion.

A DESCRIPTION OF THE PROBLEM :
Run the jdk demo application: "demo\jfc\SwingSet2".
When I choice the Windows Look and Feel, the text in
Chinese at menu bar become some little rectangles. But when
I choice other Look and Feel, It work well.


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1.double click the jar file in jdk\demo\jfc\SwingSet2
2.choice the Windows Look and Feel
3.

EXPECTED VERSUS ACTUAL BEHAVIOR :
The text in Chinese at menu bar become some little
rectangles

This bug can be reproduced always.
(Review ID: 137480) 
======================================================================

                                    

Comments
WORK AROUND

Turn off picking up of system fonts by setting the system property
'swing.useSystemFontSettings' to false.
###@###.### 2002-02-06
                                     
2002-02-06
EVALUATION

This sounds like the font doesn't have all the glyphs.
###@###.### 2001-12-19

Need to check if the simplified Chinese fonts chosen for the Windows L&F
have Latin-1 glyphs.  If not, Swing needs to relook at it's approach to
choosing fonts for native L&F.
###@###.### 2001-12-19

Apparently the WindowsL&F is picking Tahoma, which is not a composite font.
###@###.### 2002-02-06

To disable swing from using the desktop fonts you can set the system property swing.useSystemFontSettings=false, which will mean we then revert to the composite fonts and all should be well.
Our options for this are:

1. wait till there is api to create composite fonts
2. turn off picking up desktop fonts

For the time being we are going to stick with option 1. If this becomes a big problem (lots of customer votes), we will go with option 2.
###@###.### 2002-02-06

Name: nl37777			Date: 03/22/2002

JDC comments also report the same problem on
Windows2000sp2(Japanese). Tahoma does not have any CJK glyphs.

Asking application developers or end users to use a system property is
not an acceptable solution. Text display in the local language must work
right out of the box for all supported writing systems.

======================================================================

By popular demand we will be fixing this in hopper.
As there is currently no API to create a composite font we will no
longer pick up the windows fonts names in 1.4.1, rather we will just
pick up the font sizes. In 1.5 we should have the ability to create
composite fonts, at which point we can switch back to using the font
name windows specifies.
###@###.### 2002-03-22

The fix consists of two parts:
. SunGraphicsEnvironment now has the method fontSupportsDefaultEncoding,
  which returns true if the font supports the encoding corresponding to
  the file encoding property.
. WindowsLookAndFeel will now use this property to determine if it should
  use the font returned from the desktop. For systems, like Chinese 2000,
  this will return false and Swing will fallback to Dialog with the font
  size coming from the desktop.
###@###.### 2002-04-19
                                     
2002-04-19
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
hopper

FIXED IN:
hopper

INTEGRATED IN:
hopper

VERIFIED IN:
hopper-beta


                                     
2004-06-14



Hardware and Software, Engineered to Work Together