Squirrel Logo

OpenOffice.org Font Tweaks - Converting Type1 Fonts to TrueType

Johan Vromans


Warning: Draft version.

Warning: All this information has been checked with OpenOffice.org version 1.1.2 on GNU/Linux (Red Hat 7.2).

The current version of OpenOffice.org contains a serious bug, that prevents Postscript Type1 fonts from being kerned. Rumour has it that this will be fixed in the near future. This article describes a work-around solution.

Please ready my article "Why OpenOffice.org needs kerning" for more information about kerning, and why it is important.

Converting Type1 Fonts to TrueType

Actually, there's an obvious work-around for the Type1 kerning bug: do not use Type1 fonts, but use the TrueType versions instead. However, this is not always an option. If you do not have TrueType versions of your fonts, and you do not want to buy them (you've already paid for the font, it's just the packaging).

Fortunately there are some good tools available that can convert Type1 fonts to TrueType. In this article I will use Fontforge, formerly known as PfaEdit.

Fontforge is a powerful font manipulation program. It can be used to design fonts, change glyphs and metrics, and it can read and write many font formats. It is the latter property that we will use here.

Converting a Type1 font to TrueType is a piece of cake. Being an old fashioned command line person, I use Fontforge's scripting facility to convert my fonts. This is script cvt.pe:

   Open($argv[1])
   Generate($argv[1]:r+".ttf","",0)

To run it, put the Type1 font in your current directory together with it's associated metrics file, for example:

   NimbusSansL-Regu.pfb
   NimbusSansL-Regu.afm

Make sure you have installed the fontforge program in your execution path, and issue the following command:

   fontforge -script cvt.pe NimbusSansL-Regu.pfb

Fontforge will produce some lines of output similar to:

   Copyright (c) 2000-2004 by George Williams.
    Executable based on sources from 08:11 3-Jul-2004.
   FontForge used to be named PfaEdit.

When you look in your directory, you'll see two new files:

   NimbusSansL-Regu.g2n
   NimbusSansL-Regu.ttf

The file NimbusSansL-Regu.ttf is the newly created TrueType version of the original Type1 font. You can drop it in your personal OpenOffice.org fonts dir and OOo will pick it up automatically.

You can also use this facility when you want to use fonts on Microsoft Windows systems that do not have the capabilities installed to handle Type1 fonts.

For the sake of completeness, the following script will generate a .pfb and .afm pair from TrueType fonts:

   Open($argv[1])
   Generate($argv[1]:r+".pfb","",1)


© Copyright 2003-2018 Johan Vromans. All Rights Reserved.
OOo/oofonts03.html last modified 10:50:24 23-Apr-2006