Location: PHPKode > projects > Dompdf > dompdf/lib/ttf2ufm/ttf2ufm-src/FONTS.hpux.html
<HTML>
<HEAD>
<TITLE>
How to install new Type1 fonts on an HP-UX 10.20 machine
</TITLE>
</HEAD>
<BODY>
Sergey A. Babkin
<br>
<A HREF="mailto:hide@address.com">
&lt;hide@address.com&gt;</A> or <A HREF="mailto:hide@address.com">&lt;hide@address.com&gt;</A>
<p>
<! 
(Do not edit this file, it is generated from FONTS.hpux.html!!!)
>

<H3>
How to install new Type1 fonts on an HP-UX 10.20 machine
</H3>
<!
--------------------------------------------------------
>

1. Add the font files to <tt>/usr/lib/X11/fonts/type1.st/typefaces</tt>.
<p>

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

<tt>
&nbsp;&nbsp;-misc-courier-...
</tt>
<p>

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

4. For each font encoding you are going to use create a description
file in <tt>/usr/lib/X11/fonts/stadmin/type1/charsets</tt>. 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 <tt>cp.iso8859-1</tt> 
to <tt>cp.<i>&lt;your-encoding-name&gt;</i></tt>, like <tt>cp.koi8-r</tt>.
<p>

5. Restart you X server and/or font server.
<p>

<H4>
What if you don't have the `root' privileges ?
</H4>
<!
----------------------------------------------
>

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

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.
<p>

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

<blockquote><tt>
	netstat -naf inet |grep 9000
</tt></blockquote>

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.
<p>

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

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

<!
--------------8&lt;----------- cut here -----------------------------
>
<hr>
<tt>
# font server configuration file                                    
<br>
# $XConsortium: config.cpp,v 1.7 91/08/22 11:39:59 rws Exp $        
<br>
                                                                    
<br>
rasterizers = /usr/lib/X11/fs/ufstrast.sl,/usr/lib/X11/fs/iforast.sl
<br>
                                                                    
<br>
clone-self = off                                                    
<br>
use-syslog = off                                                    
<br>
catalogue = /home/babkin/fs/type1.st              
<br>
# in decipoints                                                     
<br>
default-point-size = 120                                            
<br>
default-resolutions = 100,100,75,75
<br>
port=9000                                                           
<br>
error-file=/home/babkin/fs/fs.err                 
</tt>
<hr>
<!
--------------8&lt;----------- cut here -----------------------------
>
<p>

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

<!
--------------8&lt;----------- cut here -----------------------------
>
<hr>
<tt>
TYPE1_CODEPAGE_DIR=$HOME/fs/charsets                                         
<br>
export TYPE1_CODEPAGE_DIR                                                 
<br>
kill `ps -ef | grep $HOME/\[f\]s/xfs.cfg | awk '{print $2}'`; 
<br>
nohup xfs -config $HOME/fs/xfs.cfg &
</tt>
<hr>
<!
--------------8&lt;----------- cut here -----------------------------
>
<p>

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

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

<blockquote><tt>
	xset fp+ tcp/somehost:9000
</tt></blockquote>

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:
<p>

<!
--------------8&lt;----------- cut here -----------------------------
>
<hr>
<tt>
...
<br>
$HOME/fs/runme
<br>
sleep 2 # give it some time to start
<br>
xset fp+ tcp/somehost:9000
<br>
...
</tt>
<hr>
<!
--------------8&lt;----------- cut here -----------------------------
>
<p>
</BODY>
</HTML>
Return current item: Dompdf