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-18.104.22.168-1.31.b17.el6_0.i686 (also original GA package)
Steps to Reproduce:
1. run Java AWT application using Japanese fonts
Only placeholders are displayed
Correct font display
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.
Created attachment 464244 [details]
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).
Created attachment 464246 [details]
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.
Created attachment 464247 [details]
screen shot of problem
Created attachment 464248 [details]
screen shot with fixed font mapping
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.