Sergey A. Babkin
<babkin@bellatlantic.net> or <sab123@hotmail.com>

How to install new Type1 fonts on an HP-UX 10.20 machine

1. Add the font files to /usr/lib/X11/fonts/type1.st/typefaces.

2. Add the font descriptions to /usr/lib/X11/fonts/type1.st/typefaces/fonts.scale. Run `mkfontdir' in /usr/lib/X11/fonts/type1.st/typefaces. In the descriptions you have to specify the font manufacturer as `misc', like:

  -misc-courier-...

3. Copy /usr/lib/X11/fonts/type1.st/typefaces/fonts.dir to /usr/lib/X11/fonts/type1.st/licenses/STSYSTEM/DISPLAYS/fonts.dir. Better yet, create a symbolic link.

4. For each font encoding you are going to use create a description file in /usr/lib/X11/fonts/stadmin/type1/charsets. Of course, if you are going to use the same fonts in several encodings, the best way would be to create fair descriptions of charsets and really store only one encoding in typefaces, all the others will be produced automatically. That's not difficult at all. But the simplest way is to just copy the file cp.iso8859-1 to cp.<your-encoding-name>, like cp.koi8-r.

5. Restart you X server and/or font server.

What if you don't have the `root' privileges ?

You still can run the font server and configure your X server to get the fonts from it.

Further let's suppose that the name on which you are going to run the font server is named `somehost'. Login to it and configure the font server.

First, choose some unused port. Numbers around 9000 are a good choice. Verify that this port is not used by somebody else by entering

netstat -naf inet |grep 9000
and look what happens. If you get nothing, that's good, this port is unused. If you get some lines of data, try abother port.

Go to you home directory $HOME and create some directory for your font server, say, $HOME/fs. Copy the directory structure of /usr/lib/X11/fonts/type1.st into $HOME/fs, so that in result you get $HOME/fs/type1.st/<whatever was there>. Copy the directory structure of /usr/lib/X11/fonts/stadmin/type1/charsets into $HOME/fs, so that in result you get $HOME/fs/charsets/<whatever was there>. Install the new fonts in these directorues as described above.

Then create the fontserver configuration file, say, $HOME/fs/xfs.cfg. The sample contents (supposing that my $HOME is equal to /home/babkin) is:


# font server configuration file
# $XConsortium: config.cpp,v 1.7 91/08/22 11:39:59 rws Exp $

rasterizers = /usr/lib/X11/fs/ufstrast.sl,/usr/lib/X11/fs/iforast.sl

clone-self = off
use-syslog = off
catalogue = /home/babkin/fs/type1.st
# in decipoints
default-point-size = 120
default-resolutions = 100,100,75,75
port=9000
error-file=/home/babkin/fs/fs.err

Then create the script to start your font server, say, $HOME/fs/runme:


TYPE1_CODEPAGE_DIR=$HOME/fs/charsets
export TYPE1_CODEPAGE_DIR
kill `ps -ef | grep $HOME/\[f\]s/xfs.cfg | awk '{print $2}'`;
nohup xfs -config $HOME/fs/xfs.cfg &

Don't forget to make $HOME/fs/runme executable. Then you can execute it manually or from you .profile.

After you get your font server running, just execute the following command (with proper host name and port number) in your X session

xset fp+ tcp/somehost:9000
to get the access to your private font server. You can add this information to the configuration data of your X server or just put it also into your .profile. In the latter case the best way to do that would be like:


...
$HOME/fs/runme
sleep 2 # give it some time to start
xset fp+ tcp/somehost:9000
...