StarOffice-True Type Fonts In StarOffice
Submitted by: InVestment Solutions,
Inc. and M. Peck Dickens
Published: 3 November 2000
Revision: 1.0
Here is a GIF you can view to see True Types fonts being used in StarOffice.
System Prerequisite:
Perl must be installed on your system
Ghostscript Version 6.01 must be installed on your system
You need True Type Fonts
StarOffice must be installed on your system
The tools used to make
Adobe® Type 1 fonts
Here is a quick outline of the process:
How You Do It:
Backup the/opt/Office51/xp3 directory. This backup is your parachute in the event the installation of the True Type fonts into StarOffice fails. In the event of a font installation failure into StarOffice, the X font server and StarOffice might collectively or individually do some really ugly things that will appear to defy your understanding of X windows as you know it. Do not proceed until you have backed up. In the event you have no True Type fonts installed on your system, install them now. I suggest installing the Larabie True Type fonts that are located on the distribution CD's that Caldera e2.4 shipped on. The Larabie font collection contains more than 360 different fonts (When you include bold and italic versions of the same font). This Step is based on installing the Larabie Fonts into StarOffice. However, this proceedure works with any True Type fonts. Also, I recommend obtaining and installing the M$ webfonts that are available as freeware. These fonts are of high quality. They are available in RPM format at:
http://rpmfind.net/linux/contrib/noarch/noarch/webfonts-1-3.noarch.rpm
Next, Download the tools to make Adobe Type 1 fonts out of True Type fonts. These tools are located here in a tarball that has been gzipped. Make a directory and unpack the tools.
You should see the following perl
scripts and C binaries:
| ttf2type1.pl | This is a perl script that drives ttf2pt1, ttf2pfa and t1utils. Also, it performs some other esoteric, but necessary procedures. |
| ttfontmap.pl | This is a perl script that creates True Type fontmap entries for Ghostscript. |
| ttf2pt1 | This is a C binary that produces the Adobe Type 1 font files. These files (*.pfb) are known as Printer Font Binary files. A .pfb file contains information that describes the shape of the glyphs or Symbols that compose the font that you see on your screen and that you print on paper. |
| f2pfa | This C binary creates what is known as a Printer Font ASCII (.pfa) file. The information in the .pfa file is used to assemble the font metric (.afm) file. Once the font metric file is produced, the .pfa file is deleted. A font metric file describes the width and spacing of a font. You can think of an .afm file as a box that the .pfb file is contained in. The glyphs or symbols in the .pfb file can never be larger than the box that is described by the .afm file. |
| t1asm | This C binary is used to manipulate the format of Adobe Type-1 fonts files into other formats of Adobe Type-1 font files. These formats are extremely esoteric, but necessary. Also, it creates the .t1a files. |
At this point you need to log into your system as root. This is because all the changes and or additions you are going to be making require root privileges. Remember: Keep good notes. You are logged in as root. Copy all three C binaries and the two perl scripts into the directory /usr/bin. Change the permissions of the three C binaries and the two perl scripts to executable.
Install all of the True Type fonts you want to make available to Ghostscript. If you installed the Larabie Fonts from an RPM, they are probably already available to GhostScript. To see if the Larabie fonts that you installed are available to Ghostscript go to:
/usr/share/ghostscript/fonts
In this directory you will find a file named fontmap. This particular fontmap (There are other files on your system that are located in different directories that are named fontmap) belongs exclusively to Ghostscript. Further, this is the file that you use to make StarOffice think the fonts you are adding reside in a printer. Open the file fontmap and you will see an entry for each font that is available to Ghostscript. Entries in the file fontmap looks like this:

Carefully examine the entries in the file fontmap. The example fontmap shown above depicts
having the Larabie fonts already installed in it.
Remember: All True Type fonts you want available for
installation into StarOffice must have entries in this
file. If the
file fontmap does not exist or if the file fontmap exists, but
your True Type fonts are not listed in it, execute the perl
program ttfontmap.pl in the directory that contains the fonts
you want to make available to Ghostscript. Another scenario is
that you installed the Larabie True Type fonts, but the
file
fontmap did not exist in the directory. Excute the script
ttfontmap.pl in the directory:
/usr/X11R6/lib/X11/fonts/TrueType
using the following syntax:
# ttfontmap /usr/X11R6/lib/X11/fonts/TrueType > /tmp/YourNewttfontmap
Once the program ttfontmap has completed executing, you will have a file named YourNewttfontmap in the directory /tmp. Open the file using your favorite editor. You should now see the entries that are referenced in the example fontmap, plus all of the other fonts that comprise the Larabie True Type font set. Next, go to the directory:
/usr/share/ghostscript/fonts
And look for the file named fontmap. If it does not exist, create it. Copy the all of the entries from YourNewttfontmap into it. Save the file fontmap.
It is now time to issue the following commands:
# cd
/usr/X11R6/lib/X11/fonts/TrueType
# /usr/sbin/ttmkfdir >
fonts.scale
#
/usr/X11R6/bin/mkfont.dir
Also, you have a choice: Issue the following command:
xset fp rehash
Or Restart your X server. Personally, I have no preference. I have done it both ways and they have both worked for me.
The Larabie True Type fonts are now available to Ghostscript and can be printed.
The Second Step: Using ttf2type1 to create Adobe ® Type 1 fonts
The Third Step: Adding Adobe ® Type-1 fonts to StarOffice
|
|
|