simplified chines and Java 1.5 in 10.1

Hi, I try to display simplified chinese characters with Java 1.5 under SuSE 10.1, but I only get boxes instead of the characters. I found the file /usr/lib/jvm/java-1.5.0-sun-1.5.0_07/jre/lib/fontconfig.SuSE.properties which might be relevant. Can somebody explain to me how it works. From other mails on this list I got the impression that fonts-config should find everything automatically. The problem may be related to the statement: sequence.allfonts.UTF-8.zh=latin-1,chinese-iso10646,japanese-x0208,japanese-x0201 but I am not sure. Thanks for any help. Best wishes Stefan -- Stefan Müller Universität Potsdam Tel: (+49) (+331) 977-2180 http://www.cl.uni-bremen.de/~stefan/ http://www.cl.uni-bremen.de/~stefan/Babel/Interaktiv/

Hi
I try to display simplified chinese characters with Java 1.5 under SuSE 10.1, but I only get boxes instead of the characters.
I found the file /usr/lib/jvm/java-1.5.0-sun-1.5.0_07/jre/lib/fontconfig.SuSE.properties
which might be relevant. Can somebody explain to me how it works. From other mails on this list I got the impression that fonts-config should find everything automatically.
I've attached my fontconfig. With these settings it works well for me. However there is one problem. Everytime java is updated I have to change the file again. So it's a good idea to save it somewhere:-) Bye Florian

Florian Ehinger <florian@kflog.org> さんは書きました:
I try to display simplified chinese characters with Java 1.5 under SuSE 10.1, but I only get boxes instead of the characters.
I found the file /usr/lib/jvm/java-1.5.0-sun-1.5.0_07/jre/lib/fontconfig.SuSE.properties
which might be relevant. Can somebody explain to me how it works. From other mails on this list I got the impression that fonts-config should find everything automatically.
I've attached my fontconfig. With these settings it works well for me.
However there is one problem. Everytime java is updated I have to change the file again. So it's a good idea to save it somewhere:-)
That is strange because the file which is generated by fonts-config is almost the same as your file, both use the Founder fonts. I.e. you seem to have the Founder fonts installed, otherwise it would not work for you. -- Mike FABIAN <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。

Hi, Okay, it almost works. The last character of the following sequence comes out as a box: `他 在看 书'. Tcl/TK, the shell and everybody else displays this character properly. I guess this is due to the founder fonts. Is there a way to set up Java to use Arphic fonts instead? In addition, I have the feeling that arphic look better. Thanks and greetings Stefan Müller -- Stefan Müller Universität Potsdam Tel: (+49) (+331) 977-2180 http://www.cl.uni-bremen.de/~stefan/ http://www.cl.uni-bremen.de/~stefan/Babel/Interaktiv/

Stefan Müller <Stefan.Mueller@cl.uni-bremen.de> さんは書きました:
Is there a way to set up Java to use Arphic fonts instead?
Please try http://software.opensuse.org/download/M17N/SUSE_Linux_10.1/noarch/fonts-conf... and run "SuSEconfig --module fonts" (or /usr/sbin/fonts-config). I have improved the Java 1.5 setup done by this script a little bit. Previously it did check which fonts are available and used the "best" ones only for Japanese. For Chinese the Founder fonts were hard-coded, for Korean the Baekmuk fonts. The new version of the script writes entries using the Founder fonts into the configuration file /usr/lib/jvm/java-1.5.0-sun-1.5.0_07/jre/lib/fontconfig.SuSE.propertie if the Founder fonts are available but uses the Arphic fonts if the Founder fonts are not available. For Korean it now uses the fonts from the package "unfonts" if installed and the Baekmuk fonts if not.
In addition, I have the feeling that arphic look better.
I just tested using "cgoban.jar" as a test case and indeed the Arphic fonts seem to look a bit better. That is strange because usually (i.e. in most other programs) the Founder fonts look better. And they are also more complete (have more rare glyphs than the Arphic fonts). Therefore I guess I should stay with using the Founder fonts by default if they are installed. -- Mike FABIAN <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。

Thank you very much! The new script works perfectly well. And yes, you are right, founder looks better. I looked at a string in bold font and this looks ugly. Comparing this to non-bold strings in arphic, I thought arphic is better. Thanks for all the help. Best wishes Stefan -- Stefan Müller Universität Potsdam Tel: (+49) (+331) 977-2180 http://www.cl.uni-bremen.de/~stefan/ http://www.cl.uni-bremen.de/~stefan/Babel/Interaktiv/

Stefan Müller <Stefan.Mueller@cl.uni-bremen.de> さんは書きました:
I try to display simplified chinese characters with Java 1.5 under SuSE 10.1, but I only get boxes instead of the characters.
I found the file /usr/lib/jvm/java-1.5.0-sun-1.5.0_07/jre/lib/fontconfig.SuSE.properties
which might be relevant. Can somebody explain to me how it works. From other mails on this list I got the impression that fonts-config should find everything automatically.
The problem may be related to the statement:
sequence.allfonts.UTF-8.zh=latin-1,chinese-iso10646,japanese-x0208,japanese-x0201
I don't think that is related because I have the same line and it works for me. I guess you don't have the Founder fonts installed. Please install http://ftp.opensuse.org/pub/opensuse/distribution/SL-10.1/non-oss-inst-sourc... http://ftp.opensuse.org/pub/opensuse/distribution/SL-10.1/non-oss-inst-sourc... and try again, then it should work. The file /usr/lib/jvm/java-1.5.0-sun-1.5.0_07/jre/lib/fontconfig.SuSE.properties is auto-generated by /usr/sbin/fonts-config (called by "SuSEconfig --fonts"). For Japanese, fonts-config checks which Japanese fonts are available and edits fontconfig.SuSE.properties to use the "best" ones available. For Chinese, fonts-config doesn't yet do that, it just writes entries using the Founder fonts unconditionally. If the Founder fonts are not installed, it doesn't work. I should improve that to generate alternative Chinese font entries as well if the Founder fonts are not installed but for example the Arphic PL fonts are installed. -- Mike FABIAN <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。

Thanks! That worked. Interestingly both of the font files have to be installed although I do use simplified chinese. Do the fonts for simplified chinese always use parts of the fonts for traditional chinese? Thanks again and greetings Stefan -- Stefan Müller Universität Potsdam Tel: (+49) (+331) 977-2180 http://www.cl.uni-bremen.de/~stefan/ http://www.cl.uni-bremen.de/~stefan/Babel/Interaktiv/

Stefan Müller <Stefan.Mueller@cl.uni-bremen.de> さんは書きました:
Thanks! That worked.
Interestingly both of the font files have to be installed although I do use simplified chinese. Do the fonts for simplified chinese always use parts of the fonts for traditional chinese?
No, usually not. Might be something specific to Java 1.5. -- Mike FABIAN <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。

Okay, I uninstalled the traditional fonts and changed the line: sequence.fallback=lucida,chinese-big5,japanese-x0208,japanese-x0201,korean to: sequence.fallback=lucida,chinese-gbk,japanese-x0208,japanese-x0201,korean now it works. And I get the last character right! Thanks and greetings Stefan -- Stefan Müller Universität Potsdam Tel: (+49) (+331) 977-2180 http://www.cl.uni-bremen.de/~stefan/ http://www.cl.uni-bremen.de/~stefan/Babel/Interaktiv/

Stefan Müller <Stefan.Mueller@cl.uni-bremen.de> さんは書きました:
I uninstalled the traditional fonts and changed the line:
sequence.fallback=lucida,chinese-big5,japanese-x0208,japanese-x0201,korean
to:
sequence.fallback=lucida,chinese-gbk,japanese-x0208,japanese-x0201,korean
now it works.
And I get the last character right!
Does it work with sequence.fallback=lucida,chinese-gbk,chinese-big5,japanese-x0208,japanese-x0201,korean as well? I am afraid your change might break something for traditional Chinese and I hope that adding both of them might work in this line might work for both. But I'm just guessing here. -- Mike FABIAN <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
participants (3)
-
Florian Ehinger
-
Mike FABIAN
-
Stefan Müller