Bug 643674 - Misconfigured Path for Asian Font Files
Misconfigured Path for Asian Font Files
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: java-1.6.0-openjdk (Show other bugs)
13
All Linux
low Severity medium
: ---
: ---
Assigned To: jiri vanek
Fedora Extras Quality Assurance
:
: 597114 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-17 02:17 EDT by Granville Xiong
Modified: 2010-12-05 23:01 EST (History)
10 users (show)

See Also:
Fixed In Version: java-1.6.0-openjdk-1.6.0.0-49.1.9.2.fc14
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-11 03:16:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Corrected Configuration File for Asian Fonts in Fedora (14.56 KB, application/x-wais-source)
2010-10-17 02:17 EDT, Granville Xiong
no flags Details
Java Program to Display Asian Characters (1.43 KB, text/x-java)
2010-10-17 02:18 EDT, Granville Xiong
no flags Details
A Picture of Correct Display of Three Asian Languages (23.42 KB, image/jpeg)
2010-10-19 01:03 EDT, Granville Xiong
no flags Details

  None (edit)
Description Granville Xiong 2010-10-17 02:17:25 EDT
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):

java-1.6.0-openjdk-1.6.0.0-42.b18.fc13.x86_64

How reproducible:

Everytime

Steps to Reproduce:
1. Compile and run the attached test Java program
2. Empty squares are displayed for Asian characters.
3.
  
Actual results:

Empty squares are displayed for Asian characters.

Expected results:

Correct Asian characters should be displayed.

Additional info:

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.
Comment 1 Granville Xiong 2010-10-17 02:18:30 EDT
Created attachment 453896 [details]
Java Program to Display Asian Characters
Comment 2 Deepak Bhole 2010-10-18 10:39:33 EDT
Can you also attach the /home/dimitri/config/mmsAppServer/hs_err_pid15997.log file please?
Comment 3 Deepak Bhole 2010-10-18 11:53:28 EDT
Doh.. please ignore comment #2
Comment 4 Granville Xiong 2010-10-19 01:03:27 EDT
Created attachment 454252 [details]
A Picture of Correct Display of Three Asian Languages
Comment 5 jiri vanek 2010-11-02 08:28:09 EDT
Except Xiong's patch (beware of file header!), it is also necessary to add dependencies to spec file:
sazanami-fonts-common
sazanami-gothic-fonts
sazanami-mincho-fonts
baekmuk-ttf-fonts-common
baekmuk-ttf-batang-fonts
baekmuk-ttf-dotum-fonts
baekmuk-ttf-gulim-fonts
baekmuk-ttf-hline-fonts
cjkuni-ukai-fonts
cjkuni-uming-fonts


And to recompile  .properties.src with compilefontconfig.jar to .bfc
Comment 6 jiri vanek 2010-11-03 10:56:11 EDT
*** Bug 597114 has been marked as a duplicate of this bug. ***
Comment 7 Ralf Corsepius 2010-11-26 10:00:49 EST
(In reply to comment #5)
> Except Xiong's patch (beware of file header!), it is also necessary to add
> dependencies to spec file:
> sazanami-fonts-common
> sazanami-gothic-fonts
> sazanami-mincho-fonts
> baekmuk-ttf-fonts-common
> baekmuk-ttf-batang-fonts
> baekmuk-ttf-dotum-fonts
> baekmuk-ttf-gulim-fonts
> baekmuk-ttf-hline-fonts
> cjkuni-ukai-fonts
> cjkuni-uming-fonts

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).
Comment 8 Ding-Yi Chen 2010-11-28 18:49:03 EST
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.
Comment 9 Granville Xiong 2010-11-28 20:10:36 EST
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.
Comment 10 Fedora Update System 2010-12-01 09:50:55 EST
java-1.6.0-openjdk-1.6.0.0-49.1.9.2.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/java-1.6.0-openjdk-1.6.0.0-49.1.9.2.fc14
Comment 11 Fedora Update System 2010-12-01 16:56:25 EST
java-1.6.0-openjdk-1.6.0.0-49.1.9.2.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 12 Granville Xiong 2010-12-01 20:20:16 EST
Excellent! Could you also make a package for Fedora 13, so that I can test with? Thanks a lot!
Comment 13 Deepak Bhole 2010-12-01 21:17:24 EST
F13 package is already out:

https://admin.fedoraproject.org/updates/java-1.6.0-openjdk-1.6.0.0-46.1.8.3.fc13
Comment 14 Granville Xiong 2010-12-05 23:01:07 EST
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.

Thanks!

Note You need to log in before you can comment on or make changes to this bug.