JDK-4615396 : Swing: chinese text cann't show when select 'WindowsLookAndFeel'
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.0
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2001-12-18
  • Updated: 2002-06-20
  • Resolved: 2002-04-26
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.
Other
1.4.1 hopperFixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
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
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: hopper FIXED IN: hopper INTEGRATED IN: hopper VERIFIED IN: hopper-beta
14-06-2004

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
19-04-2002

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