Bug 643674 - Misconfigured Path for Asian Font Files
Summary: Misconfigured Path for Asian Font Files
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: java-1.6.0-openjdk
Version: 13
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: jiri vanek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 597114 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-17 06:17 UTC by Granville Xiong
Modified: 2010-12-06 04:01 UTC (History)
10 users (show)

Fixed In Version: java-1.6.0-openjdk-1.6.0.0-49.1.9.2.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-11 08:16:38 UTC
Type: ---


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

Description Granville Xiong 2010-10-17 06:17:25 UTC
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 06:18:30 UTC
Created attachment 453896 [details]
Java Program to Display Asian Characters

Comment 2 Deepak Bhole 2010-10-18 14:39:33 UTC
Can you also attach the /home/dimitri/config/mmsAppServer/hs_err_pid15997.log file please?

Comment 3 Deepak Bhole 2010-10-18 15:53:28 UTC
Doh.. please ignore comment #2

Comment 4 Granville Xiong 2010-10-19 05:03:27 UTC
Created attachment 454252 [details]
A Picture of Correct Display of Three Asian Languages

Comment 5 jiri vanek 2010-11-02 12:28:09 UTC
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 14:56:11 UTC
*** Bug 597114 has been marked as a duplicate of this bug. ***

Comment 7 Ralf Corsepius 2010-11-26 15:00:49 UTC
(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 23:49:03 UTC
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-29 01:10:36 UTC
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 14:50:55 UTC
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 21:56:25 UTC
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-02 01:20:16 UTC
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-02 02:17:24 UTC
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-06 04:01:07 UTC
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.