The JGloss User's Guide already has some information on using Japanese fonts with Java. This document provides further tips.
The Java runtime uses the font.properties files for font configuration. If you need more information on the format of the files, the Java Development Kit documentation has a detailed explanation. There is also an overview of how the font mechanism of Java works.
A useable font should be detected by JGloss the first time it is started. If you configure Java to use the fonts from the "preferences.properties.ja" file, you have to assure that the requested fonts are installed. Sun's Java Runtime Environment assumes that the fonts MS Gothic (msgothic.ttf) and MS Mincho (msmincho.ttf) are installed. If you follow the instructions in the user guide, and still only see empty boxes where Japanese characters should be displayed, check the fonts folder if both fonts are available.
If you run an X server which can use TrueType fonts, you can install the Japanese fonts which come with the Windows Japanese support. The directions here are written for XFree 4 installed on Red Hat Linux, and assumes that a TrueType font directory is already configured.
msgothic.ttf -Ricoh-MS Gothic-medium-r-normal--0-0-0-0-c-0-iso10646-1 msgothic.ttf -Ricoh-MS Gothic-medium-r-normal--0-0-0-0-c-0-jisx0201.1976-0 msgothic.ttf -Ricoh-MS Gothic-medium-r-normal--0-0-0-0-c-0-jisx0208.1983-0 msgothic.ttf -Ricoh-MS Gothic-medium-r-normal--0-0-0-0-c-0-jisx0208.1990-0 msgothic.ttf -Ricoh-MS Gothic-medium-r-normal--0-0-0-0-c-0-jisx0212.1990-0 msgothic.ttf -Ricoh-MS Gothic-medium-r-normal--0-0-0-0-c-0-iso8859-1 msgothic.ttf -Ricoh-MS Gothic-medium-r-normal--0-0-0-0-c-0-ascii-0 msgothic.ttf -Ricoh-MS Gothic-medium-r-normal--0-0-0-0-p-0-iso10646-1 msgothic.ttf -Ricoh-MS Gothic-medium-r-normal--0-0-0-0-p-0-jisx0201.1976-0 msgothic.ttf -Ricoh-MS Gothic-medium-r-normal--0-0-0-0-p-0-jisx0208.1983-0 msgothic.ttf -Ricoh-MS Gothic-medium-r-normal--0-0-0-0-p-0-jisx0208.1990-0 msgothic.ttf -Ricoh-MS Gothic-medium-r-normal--0-0-0-0-p-0-jisx0212.1990-0 msgothic.ttf -Ricoh-MS Gothic-medium-r-normal--0-0-0-0-p-0-iso8859-1 msgothic.ttf -Ricoh-MS Gothic-medium-r-normal--0-0-0-0-p-0-ascii-0 msmincho.ttf -Ricoh-MS Mincho-medium-r-normal--0-0-0-0-c-0-iso10646-1 msmincho.ttf -Ricoh-MS Mincho-medium-r-normal--0-0-0-0-c-0-jisx0201.1976-0 msmincho.ttf -Ricoh-MS Mincho-medium-r-normal--0-0-0-0-c-0-jisx0208.1983-0 msmincho.ttf -Ricoh-MS Mincho-medium-r-normal--0-0-0-0-c-0-jisx0208.1990-0 msmincho.ttf -Ricoh-MS Mincho-medium-r-normal--0-0-0-0-c-0-jisx0212.1990-0 msmincho.ttf -Ricoh-MS Mincho-medium-r-normal--0-0-0-0-c-0-iso8859-1 msmincho.ttf -Ricoh-MS Mincho-medium-r-normal--0-0-0-0-c-0-ascii-0 msmincho.ttf -Ricoh-MS Mincho-medium-r-normal--0-0-0-0-p-0-iso10646-1 msmincho.ttf -Ricoh-MS Mincho-medium-r-normal--0-0-0-0-p-0-jisx0201.1976-0 msmincho.ttf -Ricoh-MS Mincho-medium-r-normal--0-0-0-0-p-0-jisx0208.1983-0 msmincho.ttf -Ricoh-MS Mincho-medium-r-normal--0-0-0-0-p-0-jisx0208.1990-0 msmincho.ttf -Ricoh-MS Mincho-medium-r-normal--0-0-0-0-p-0-jisx0212.1990-0 msmincho.ttf -Ricoh-MS Mincho-medium-r-normal--0-0-0-0-p-0-iso8859-1 msmincho.ttf -Ricoh-MS Mincho-medium-r-normal--0-0-0-0-p-0-ascii-0Also increase the number in the first line of the file (number of entries) by 28.
mkfontdir -e /usr/X11R6/lib/X11/fonts/encodings -e /usr/X11R6/lib/X11/fonts/encodings/large
in the font directory.
killall -HUP xfs
). The fonts should
now be available to X11 applications. You can test this by running xlsfonts | grep -i -e ricoh
,
which should display the list of just installed fonts.
-wadalab-mincho-
with -ricoh-ms mincho-
and -wadalab-gothic-
with -ricoh-ms gothic-
.
(C) 2001-2003 Michael Koch <tensberg@gmx.net>; last change: 2003/02/21