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:
- Get the TrueType fontserver xfsttos2 and unzip the archive into the root of your XFree86/OS2 drive.
- Copy the TrueType fonts you want to install to /XFree86/lib/X11/fonts/Truetype.
- Convert the fonts' filenames to lowercase using rencase -l * in the fonts' directory.
- Start xfstt -once without starting XFree86/OS2.
-
Add the line FontPath "inet/127.0.0.1:7100" to the other Fontpath statements in Section "Files" in your XF86Config file. 7100 is the port which the font server is using.
The respective section of XF86Config should look similar to the following (with the same differences regarding drive letters as above):
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/" FontPath "inet/127.0.0.1:7100" # 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
-
Insert the lines
font-service 7100/tcp #X Font Service font-service 7100/udp #X Font Service
into the %ETC%\services file (%ETC% is the value of the ETC environment variable, on Warp 4 bootdrive:\MPTN\ETC), if there are not already included. Again 7100 is the font server's port. The file's respective part should look similar to the following:
# #Brian Hammill <brianh@exide.com> dpserve 7020/tcp #DP Serve dpserve 7020/udp #DP Serve dpserveadmin 7021/tcp #DP Serve Admin dpserveadmin 7021/udp #DP Serve Admin # #Allan Stanley <allan@hummingbird.com> lazy-ptop 7099/tcp #lazy-ptop lazy-ptop 7099/udp #lazy-ptop # #Guy Keren <Guy_Keren@mail.stil.scitex.com> font-service 7100/tcp #X Font Service font-service 7100/udp #X Font Service # #Stephen Gildea <gildea@expo.lcs.mit.edu> virprot-lm 7121/tcp #Virtual Prototypes License Manager virprot-lm 7121/tcp #Virtual Prototypes License Manager
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.