This page describes step-by-step how you can install X fonts on
a UNIX system running X-windows. As an example I use the
jiskan16 font which contains 16x16 bitmaps of the
Japanese kanji glyphs. I assume you already fetched
bdftopcfover each of them:
bdftopcf jiskan16.bdf > jiskan16.pcf
pcf fonts will load much faster than the
bdf sources since they are compiled.
jiskan16.pcf with a smaller file
assuming that your current directory is the directory with the
fonts. This command will create a file called
fonts.dir in the directory containing the fonts.
fonts.dir file contains ASCII so you can display
its contents with
It will look similar to:
The first line indicates how many fonts are stored in this directory (in this case just one font). The remaining lines in the file have two fields per line. The first field is the file name of the font. The second field is the X font name of the font.
Although this might not be the best time and place to explain all these strings and numbers in the font name let me mention the most important ones (you can skip this if you're not interested):
- The screen resolution this font was designed for. If your screen has a different resolution (like 100 dpi) you can still use this font, it just looks smaller.
- The pointsize of the font. If your screen is 100 dpi the font will not display at 16 point but at
- The encoding of the font. The encoding of a font relates input character codes to glyphs in the font.
xset fp+ /full/path/to/font/directory
Check the current font path with the X command:
xset fp rehash
To check if the new fonts are known to the X-server check the
fonts.dir file for the name (second column) of one
of the newly installed fonts and next execute:
xfd -fn -jis-fixed-medium-r-normal--16-150-75-75-c-160-jisx0208.1983-0
This should display the 16 point kanji font in the font browser.
If you don't have the
xfd program try the command:
xlsfonts | grep jis
and see if the new fonts are listed.