StarOffice 5.1 does not have TTF support, even through the X server. In fact, StarOffice has its own font managment. There are two ways to use TTF in StarOffice. Both rely on the conversion of TTF in Type1 fonts :
- Convert TTF in Type1 and install Type1 fonts in the X server.
- Convert TTF in Type1 and install in StarOffice.
I use the second solution, that I will describe later.
To do that, you will need :
- a convert utility TTF->Type1 : ttf2pt1 (ttf2pt1-321.tgz or ttf2pt1-3.1.1-1.i386.rpm)
- a PERL script to adapt these files : afm.pl (afm.pl)
- a utility to create the fonts.dir file : ttmkfdir (ttmkfdir_1.0-5_i386.deb or ttmkfdir.tar.gz)
To make these steps easier, I wrote two small scripts :
- Convert a file : StarOfficeTTF.sh (StarOfficeTTF.sh)
- Process with all fonts : StarOfficeALL.sh (StarOfficeTTFAll.sh)
You have to edit these two scripts to specify the paths of yours applications and font files :
- SO_PATH or SOPATH : StarOffice path.
- TEMP : Temporary directory. This directory must be empty.
You need also to check that the link to use perl exists :
ln -s /usr/bin/perl /usr/local/bin/perl.
Check that you have the accurate rights on the directories you specified.
Launch the script StarOfficeTTFALL.sh <TTF path>
The script may take some time. Check there is no errors. Is everything is ok, you shoould have the fonts you installed the next time you launch StarOffice.
Here are just a few information that could be helpful :
- The .afm format for StarOffice differs slightly with the Type1 format. That’s why you need to use the afm.pl script.
- The fonts.dir file created by ttmkfdir is a little different, that’s why you need to keep only a line per file, and to change the end of the line.
These programs are written by several authors and are distributed under GPL license.