How to install new Type1 fonts on an HP-UX 10.20 machine Sergey A. Babkin
<> or <>

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

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

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


3. Copy /usr/lib/X11/fonts/ to /usr/lib/X11/fonts/ 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/ into $HOME/fs, so that in result you get $HOME/fs/<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/,/usr/lib/X11/fs/

clone-self = off
use-syslog = off
catalogue = /home/babkin/fs/
# in decipoints
default-point-size = 120
default-resolutions = 100,100,75,75

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

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:

sleep 2 # give it some time to start
xset fp+ tcp/somehost:9000