Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 56444 - sun-jdk installations do not have proper font configurations (cjk?)
Summary: sun-jdk installations do not have proper font configurations (cjk?)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-08 05:03 UTC by Georgi Georgiev
Modified: 2006-11-22 15:35 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
sun-jdk-1.5.0.08-r1.patch (sun-jdk-1.5.0.08-r1.patch,319 bytes, patch)
2006-11-10 21:49 UTC, MATSUU Takuto (RETIRED)
Details | Diff
files/fontconfig.Gentoo.properties (fontconfig.Gentoo.properties,10.68 KB, text/plain)
2006-11-10 21:50 UTC, MATSUU Takuto (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Georgi Georgiev 2004-07-08 05:03:03 UTC
Problem:

Java applications do not display Japanese fonts if using a sun-jdk package. I haven't checked with other java environments. The problem is that the default font configuration for Japanese, included in the distribution of the sun-jdk package is absolutely incorrect on gentoo. The ebuilds should take care of the problem, possibly by supplying a custom configuration file.

For example, the 1.4.x series of the java-package look in ${JAVA_HOME}/jre/lib for the font configuration files. After looking at a few strace outputs, it seems that the best bet would be to install a gentoo-specific font.properties.ja file (which is the last file that java resorts to, if using a Japanese locale).

I am not very fluent in font configurations, but I know that the current one (referring to "watanabe" fonts) is not correct. Furthermore, it is possible to use ttf fonts directly, but their path has to be specified explicitly. I guess that a useflag (cjk?) and a dependency on kochi-substitute (cjk ? kochi-substitute) may be necessary. It seems that the RedHat8 file is the best bet to use as a template for the gentoo installation.

Another note of warning is that the 1.5.x series of the sun-jdk package have a different configuration file, which is however, much nicer to manage. Since sun-jdk does not recognize Gentoo, and does not have a proper configuration file, installing a ${JAVA_HOME}/jre/lib/fontconfig.properties file (possibly by using RedHat's file as a template and substituting the paths) is the way to go.

I am not submitting patches, because I am not sure that my system is properly configured in respect to fonts. I have installed fonts myself in more or less arbitrary locations (TrueType, TTF, truetype), and I am using old versions of the kochi fonts, so I am not sure that a patch that I submit would work on any other gentoo system. And as a last point, I only read Japanese, so I cannot help with the other cjk fonts.
Comment 1 Jackey Yang ("timeout" in forum) 2004-07-09 19:35:47 UTC
if you installed fonts yourself(i did so), you have to change 
/opt/sun-jdk-1.4.2.04/jre/lib/font.properties.ja
Here is what i did:
i modified font.properties and saved as font.properties.zh_CN.

I used Microsoft Simpilified Chinese TTF
Comment 2 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2004-12-23 02:19:01 UTC
We don't have any non-latin developers at the present time, so we're a bit uncertain as to what is the best way to attack this. 

If anybody in the cjk herd can come up with a solution, or at least provide us with some good guidelines, assistance and testing, we should be able resolve this bug.

Reassigning to you guys so you may add your thoughts on the matter. 
Comment 3 MATSUU Takuto (RETIRED) gentoo-dev 2006-11-10 21:49:17 UTC
Created attachment 101647 [details, diff]
sun-jdk-1.5.0.08-r1.patch
Comment 4 MATSUU Takuto (RETIRED) gentoo-dev 2006-11-10 21:50:12 UTC
Created attachment 101649 [details]
files/fontconfig.Gentoo.properties
Comment 5 MATSUU Takuto (RETIRED) gentoo-dev 2006-11-10 21:54:15 UTC
java herds: please add the fontconfig.Gentoo.properties for cjk font support.

this is based on fontconfig.RedHat.9.0.properties.src.

cf.
 http://java.sun.com/j2se/1.5.0/docs/guide/intl/fontconfig.html
Comment 6 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-11-22 15:29:57 UTC
Fixed in sun-jdk-1.5.0.09-r1, thanks for the patch/config. If anyone wants it for sun-jdk-1.4 too, please reopen.
Comment 7 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-11-22 15:34:44 UTC
Applied also to sun-jdk-1.5.0.09-r1.
Comment 8 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-11-22 15:35:09 UTC
Meant sun-jre-bin-1.5.0.09-r1. Sorry for the bugspam.