You need superuser privilege to make changes to X font directories. Before you make any changes to any IRIX directory, make a copy of its contents so that you can restore that directory if anything goes wrong. For example, your font files may not be in the right format, and they may interfere with the access of Silicon Graphics font files. Keep a log of the changes you make, and mention those changes when you report a problem with font files to Silicon Graphics; otherwise, it may be very difficult or impossible for other people to reproduce any problems that you might report.
To add the Utopia bitmap fonts to the X Window System, Display PostScript, and IRIS GL Font Manager, follow these steps:
Filenames closer to IRIX conventions are utopR10 through utopR24 (followed by the appropriate file suffixes).
BDF font files are text (ASCII) files. You can think of them as source font files. You can put BDF font files into an X font directory, but noormal practice is to use only binary font formats such as the PCF (.pcf) or compressed PCF format (.pcf.Z) for performance reasons.
Use the bdftopcf command to convert a BDF font file to a PCF font file (see the bdftopcf(1) reference page). For example, Adobe provided two sets of Utopia Regular bitmap font files that were designed for the resolutions of 100 and 75 dpi. These files were in the extended Bitmap BDF 2.1 format. The original names of the bitmap files were UTRG_10.bdf through UTRG_24.bdf. One of them could be converted with the following command:
bdftopcf -o utopR10.pcf UTRG_10.bdf
However, you normally want to compress the PCF file as well.You can compress a PCF file by entering a command such as:
compress utopR10.pcf
But you could combine both steps simply as follows:
bdftopcf UTRG_10.bdf | compress -c >utopR10.pcf.Z
bdftopcf UTRG_10.bdf | compress -c
>/usr/lib/X11/fonts/100dpi/utopR10.pcf.Z
You can tell the resolution for which a font was designed by the name of the directory in which the font designer stored the font files, or by the information in the header of a bitmap font file. In a BDF 2.1 font file, the horizontal and vertical resolution are specified in the X font name. They are also specified after the point size as the second and third numeric values in a SIZE entry. For example, the entry:
SIZE 8 100 100
within the file indicates an 8-point font that was designed for the horizontal and vertical resolution of 100 dpi.
When adding a new Type 1 font, insert an entry in the appropriate file for each style variation in the font family. It is not necessary to have an entry for each bitmap size. For example, the entries in ps2xlfd_map for the Utopia fonts are:
Utopia-Bold -adobe-utopia-bold-r-normal--0-0-0-0-p-0-iso8859-1
Utopia-BoldItalic -adobe-utopia-bold-i-normal--0-0-0-0-p-0-iso8859-1
Utopia-Italic -adobe-utopia-medium-i-normal--0-0-0-0-p-0-iso8859-1
Utopia-Regular -adobe-utopia-medium-r-normal--0-0-0-0-p-0-iso8859-1
The first field is the PostScript font name, as specified in the outline font file (see "Adding an Outline Font"). The second field is the X 14-part font name with 0 for all specific dimension values.
When you add your own bitmap or outline fonts, put their entries in a file called /usr/lib/X11/fonts/ps2xlfd_map.local. That way your entries do not disappear when you upgrade your system software.
Make sure that there is no overlap between your entries and the entries in other ps2xlfd_map* files.
mkfontdir /usr/libX11/fonts/*dpi
to create a new fonts.dir (fonts directory) file in the 100dpi and 75dpi directories.
xset fp rehash
xlsfonts > /tmp/fontlist
The names of the fonts you added should appear on the list of font names and aliases produced by xlsfonts.
You can install only Adobe text (ASCII) Type 1 font files or compatibles, not binary Type 1 font files and not Type 3 font files. Display PostScript can handle Type 3 font files, but the X Window System and IRIS GL Font Manager cannot.
pfb2pfa UTRG____.pfb UTRG____.pfa
/FontName
entry in the header of that outline font file. For example, if you enter:
grep /FontName Courier-Bold
in the directory /usr/lib/DPS/outline/base, you get:
/FontName /Courier-Bold def
The name revealed is used for the filename of the outline font, the filename of the metric file, and in the /usr/lib/X11/fonts/ps2xlfd.map file.
For example, Adobe provided the Utopia Regular outline font file UTRG____.pfa, which is an outline font file in the Type 1 format. To find the PostScript font name for this font, enter:
grep /FontName UTRG____.pfa
You should get the response:
/FontName Utopia-Regular def
When this font was added to IRIX, the name of the file UTRG____.pfa was changed to Utopia-Regular.
/usr/lib/X11/fonts/Speedo
/usr/bin/X11/makepsres -o /usr/lib/DPS/DPSFonts.upr
/usr/lib/DPS/outline/base /usr/lib/DPS/AFM
You should now be able to access the font file you added via Display PostScript.
/usr/lib/X11/fonts/ps2xlfd_map
as described in "Adding a Bitmap Font." The same entry is used for both bitmap and outline fonts.
If you add your own (local) bitmap or outline fonts, put an entry for each font family in the file called:
/usr/lib/X11/fonts/ps2xlfd_map.local
You can use entries in the file ps2xlfd_map as templates for entries in the file ps2xlfd_map.local.
If the file ps2xlfd_map.local does not exist, log in as root, and create it.
You can now access the font you added via the IRIS GL Font Manager.
type1xfonts
xset fp rehash
This re-creates symbolic links in the directory /usr/lib/X11/fonts/Type1 that point to outline font files in the directory /usr/lib/DPS/outline/base, and instructs the X Window System to check which fonts are available.
xlsfonts | grep family-name
Adding of large outline fonts in the CID-keyed format is so complicated that you should contact Silicon Graphics if you want to add a font in that format. You will need to provide CIDFont and AFM files for a CID-keyed font. If existing CMap files are not sufficient, you will need to also provide one or more CMap files. Silicon Graphics will then generate CCM and CFM files from those files.
For example, Adobe provided the Utopia Regular font metric file UTRG____.AFM. When this font was added to IRIX, the name was changed to Utopia-Regular to correspond to the line
in /usr/lib/X11/fonts/ps2xlfd_map.Utopia-Regular -adobe-utopia-medium-r-normal--0-0-0-0-p-0-iso8859-1
The file was put in the directory /usr/lib/DPS/AFM.
Font metric files for a large outline font in the CID-keyed format should be put in the directory /usr/lib/X11/fonts/CID/character-collection/AFM. There is one AFM file for each CIDFont file, and one AFM file for each CID-keyed font.