Red Hat Bugzilla – Bug 643674
Misconfigured Path for Asian Font Files
Last modified: 2010-12-05 23:01:07 EST
Created attachment 453895 [details]
Corrected Configuration File for Asian Fonts in Fedora
Description of problem:
1) The font configuration file fontconfig.Fedora.properties.src in $JREDIR/lib contains wrong paths for Asian font files.
2) A symbol file, fontconfig.Fedora.properties, linked to fontconfig.Fedora.properties.src is also missing. Without this file, the JRE cannot display correct Asian fonts in Java applications.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Compile and run the attached test Java program
2. Empty squares are displayed for Asian characters.
Empty squares are displayed for Asian characters.
Correct Asian characters should be displayed.
1) A correct fontconfig.Fedora.properties.src is also attached.
2) A symbol file should also be created using:
ln -s fontconfig.Fedora.properties.src fontconfig.Fedora.properties
3) The corrected configuration file is also tested by running Azureus software in different locale settings and observing correct displays for all Asian characters.
Created attachment 453896 [details]
Java Program to Display Asian Characters
Can you also attach the /home/dimitri/config/mmsAppServer/hs_err_pid15997.log file please?
Doh.. please ignore comment #2
Created attachment 454252 [details]
A Picture of Correct Display of Three Asian Languages
Except Xiong's patch (beware of file header!), it is also necessary to add dependencies to spec file:
And to recompile .properties.src with compilefontconfig.jar to .bfc
*** Bug 597114 has been marked as a duplicate of this bug. ***
(In reply to comment #5)
> Except Xiong's patch (beware of file header!), it is also necessary to add
> dependencies to spec file:
Could you explain why this bloat is necessary?
You have just forced all of the world to install a huge mass of font packages they will never have a use for.
/me feels you are playing with symptoms without providing an actual fix (Which would be to make fontconfig functional).
Although I do prefer to see the actual characters instead of white box for the language I don't understand, I agree that we shouldn't make those as dependencies.
I did provide a patch for 597114 (which is a duplicate of this bug), which shows Chinese characters if "Chinese support" group is installed.
I think the best-practice solution is to fix this problem of incorrect font paths while keeping the minimal dependency of JDK by itself. So just make sure the file names and paths in the fontconfig files are consistent with the actual font installation paths from the corresponding language packages. This is it! Therefore the JDK can correctly display Asian fonts once the language packages are installed. If the language packages are not installed, the settings of Asian fonts in fontconfig files don't affect anything.
java-1.6.0-openjdk-184.108.40.206-220.127.116.11.fc14 has been submitted as an update for Fedora 14.
java-1.6.0-openjdk-18.104.22.168-22.214.171.124.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.
Excellent! Could you also make a package for Fedora 13, so that I can test with? Thanks a lot!
F13 package is already out:
I checked out the updated package and found out that the paths of Asian fonts included in fontconfig.Fedora.properties.src still seem different from the actual paths installed by corresponding Asian font packages, as listed below:
Chinese font packages:
cjkuni-ukai-fonts-0.2.20080216.1-42.fc13.noarch -> /usr/share/fonts/cjkuni-ukai/ukai.ttc
cjkuni-uming-fonts-0.2.20080216.1-42.fc13.noarch -> /usr/share/fonts/cjkuni-uming/uming.ttc
Japanese font packages:
sazanami-gothic-fonts-0.20040629-14.fc13.noarch -> /usr/share/fonts/sazanami/gothic/sazanami-gothic.ttf
sazanami-mincho-fonts-0.20040629-14.fc13.noarch -> /usr/share/fonts/sazanami/mincho/sazanami-mincho.ttf
Korean font packages:
baekmuk-ttf-gulim-fonts-2.2-29.fc13.noarch -> /usr/share/fonts/baekmuk-ttf/gulim.ttf
baekmuk-ttf-batang-fonts-2.2-29.fc13.noarch -> /usr/share/fonts/baekmuk-ttf/batang.ttf
However the font paths listed in /usr/lib/jvm/jre/lib/fontconfig.Fedora.properties.src included in openjdk package differ from above actual font paths, and therefore could not product desired correct display of Asian characters.