Bug 659300

Summary: Japanese font mappings are broken
Product: Red Hat Enterprise Linux 6 Reporter: Martin Wilck <martin.wilck>
Component: java-1.6.0-openjdkAssignee: Deepak Bhole <dbhole>
Status: CLOSED ERRATA QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: high Docs Contact:
Priority: high    
Version: 6.0CC: gasmith, ltroan, patrickm, syeghiay
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: java-1.6.0-openjdk-1.6.0.0-1.34.1.9.5.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 727195 (view as bug list) Environment:
Last Closed: 2011-05-19 13:45:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 727195    
Attachments:
Description Flags
test case
none
proposed patch
none
screen shot of problem
none
screen shot with fixed font mapping none

Description Martin Wilck 2010-12-02 13:13:28 UTC
Description of problem:
Java GUI applications running in Japanese locale show no fonts.

Version-Release number of selected component (if applicable):
java-1.6.0-openjdk-1.6.0.0-1.31.b17.el6_0.i686 (also original GA package)

How reproducible:
always

Steps to Reproduce:
1. run Java AWT application using Japanese fonts
  
Actual results:
Only placeholders are displayed

Expected results:
Correct font display

Additional info:
Root cause: The fontconfig file for RHEL6 maps Japanese fonts to Sazanami fonts, which are not available under RHEL6. IPA or VLGothic fonts must be mapped instead.

Comment 1 Martin Wilck 2010-12-02 13:17:00 UTC
Created attachment 464244 [details]
test case

This is a small test case derived from the sample application under http://regumindtrail.wordpress.com/2007/01/30/writing-a-java-swing-application-to-display-japanese-characters/ that demonstrates the problem.

1 Run "make test" to see the problem.

2 Run "make good" to install a modified fontconfig file that fixes the problem (requires the IPA gothic and VL gothic font packages to be installed).

3 Run "make test" again - characters are now displayed nicely. I am not a Japanese speaker, so I can't tell if the encoding is 100% correct, but it looks like Japanese (unlike before).

Comment 2 Martin Wilck 2010-12-02 13:21:12 UTC
Created attachment 464246 [details]
proposed patch

This is a possible patch that I was using to enable the Japanese fonts. However, it is not a perfect solution. Red Hat should work out a solution where the availability of the different Japanese font packages is checked at openjdk install time, and the fontconfig file is auto-generated depending on the font availability. Likewise, if font packages are installed or uninstalled, the JDK fontconfig file should be updated to the best possible configuration with the current set of system fonts.

Comment 3 Martin Wilck 2010-12-02 13:22:00 UTC
Created attachment 464247 [details]
screen shot of problem

Comment 4 Martin Wilck 2010-12-02 13:22:31 UTC
Created attachment 464248 [details]
screen shot with fixed font mapping

Comment 12 errata-xmlrpc 2011-05-19 13:45:00 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0632.html