Mike FABIAN さんは書きました:
If anybody here knows the details of Java font configuration,
please have a look at the
http://www.suse.de/~mfabian/m17n/font.properties.ja
file and tell me how it is possible that it works just fine on some
machines whereas it doesn't work at all on others.
Thanks to help from Shinkichi Yamazaki
who pointed me to the
http://java.sun.com/j2se/1.4.2/docs/guide/intl/fontprop.html
page, I found the bug in the above font.properties.ja file.
This file contains lines like
filename.-misc-sazanami_mincho-medium-r-normal--*-%d-*-*-*-*-iso10646-1=/usr/X11R6/lib/X11/fonts/truetype/sazanami-mincho.ttf
Here it is important that the character between "sazanami" and
"mincho" ia an underscore and not a space as in the XLFD or in the
other entries in font.properties.ja like:
serif.3=-misc-sazanami mincho-medium-r-normal--*-%d-*-*-*-*-iso10646-1
Without the underscore these lines are ignored.
And if these lines are ignored, Java has problems to find out
which font file belongs to which XLFD. If the directory where
the fonts are is configured with
appendedfontpath=/usr/X11R6/lib/X11/fonts/truetype
(or a symlink exists), Java might find the correct fonts even without
working
filename.PlatformFontName
entries, but apparently this depends on how many and what type of
fonts are installed, therefore it can work on some machines and fail
on others.
It is not reliable possible to infer the font file name only from the
XLFD, therefore this hint is needed to make sure Java finds the
correct font file.
The first version of font.properties.ja I uploaded still had the
space/underscore bug, if you download it again now you get the fixed
version which works reliably on all my machines.
--
Mike FABIAN http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。