The OS/2 Files

Main text

Font installation in XFree86/OS2 3.3.x

Thanks to Khairil Yusof and others on the XFree86/OS2 mailing list.

The XFree86/OS2 distribution contains several font packages. To be able to additionally use the Type1 and TrueType fonts (e.g. in The GIMP) installed on "normal" OS/2 some things have to be done.

1. Type1 fonts

To install Type1 fonts open your XF86Config file and go to the section containing several FontPath statements. Now add a new FontPath path statement to the Section "Files" for every directory containing Type1 fonts you want to install. Each must useend with slashes as path seperators and end with a slash "/". If the desired font directory is not located on the same drive as XFree86/OS2, you must specifiy the drive letter.

If your bootdrive was C: and you wanted to add your OS/2 system font directory PSFONTS to the existing font paths, for instance, the respective part of XF86Config would look like the following:

Section "Files"

# The location of the RGB database.  Note, this is the name of the
# file minus the extension (like ".txt" or ".db").  There is normally
# no need to change the default.

RgbPath   "/XFree86/lib/X11/rgb"

# Multiple FontPath entries are allowed (which are concatenated together),
# as well as specifying multiple comma-separated entries in one FontPath
# command (or a combination of both methods)

#    FontPath   "/XFree86/lib/X11/fonts/local/"
FontPath   "/XFree86/lib/X11/fonts/misc/"
FontPath   "/XFree86/lib/X11/fonts/75dpi/:unscaled"
FontPath   "/XFree86/lib/X11/fonts/100dpi/:unscaled"
FontPath   "/XFree86/lib/X11/fonts/Type1/"
FontPath   "/XFree86/lib/X11/fonts/Speedo/"
FontPath   "/XFree86/lib/X11/fonts/75dpi/"
FontPath   "/XFree86/lib/X11/fonts/100dpi/"
FontPath   "c:/PSFONTS/"

# For OSs that support Dynamically loaded modules, ModulePath can be
# used to set a search path for the modules.  This is currently supported
# for Linux ELF, FreeBSD 2.x and NetBSD 1.x.  The default path is shown
# here.

#    ModulePath

EndSection

Unfortunately there is more to do. All these directories have to contain the files fonts.dir and fonts.scale which carry information about the fonts. Your X-server will crash, if those files are missing or contain incorrect information. Creating those files by hand is very unconvenient. The Perl script type1inst does it automatically. (You must have installed Perl to be able to run it!)

The archive contains the three files rencase.exe, type1inst and t1embed. Copy rencase.exe into your path and the other two files into the same directory (e.g. \Perl\lib). The tool rencase.exe can be used to convert filenames to upper- or lowercase. This is important since the type1inst script isn't case sensitive, but the X server is and it will not start if the entries in the desription files don't exactly match the filenames.

Go to each font directory which you want to add and convert all filenames to lowercase using:

rencase -l *

Then issue the command

perl path_to_type1inst\type1inst

Now the script should generate the description files. Whenever you add new fonts or remove old ones you'll have to do this again.

When you now fire up XFree86/OS2 the new fonts should be available.

2. TrueType fonts

The installation of TrueType fonts is more complicated, since XFree86/OS2 version 3.3.x does not support them.
For version 3.3.x the following seems to be the best solution:

CAUTION: If you have too many fonts in the directory you will run out of memory to load up GNOME applications as more fonts continue to be loaded. To solve this problem, limit the number of Truetype fonts in your directory or close the XFree86/OS2 session and XFSTT and reload both again. Limiting the number fonts in the font directory is the best solution.
It also seems that following the original documentation doesn't work. On some systems the speed varies greatly depending on the used port. If you experience performance degradation try changing the port. Be sure to change both configuration files accordingly!

WARNING: If you select a corrupt font in an X program for display the fontserver may crash. Unfortunately, this leads to the X server also crashing. If you see your X programs not responding correctly after selecting a font, change to the WPS immediately and terminate the fontserver and the X session from there. You can start them again after this, but remember to delete the corrupt font's file and run the type1inst script.