Montag, 8. Oktober 2007

Installing Type1 fonts for OpenOffice

My wife has a binary encoded Type1 font (a .pfb and a .pfm file) that contains symbols for guitar tab notation. It came with some Windows software, and obviously in Windows the .pfb file and .pfm file are enough to use the font.

Right clicking the .pfb file in KDE let's you install the font, but it doesn't show up in OpenOffice's font selector. KWord on the other hand let's you use it.

After some googling I found out that OpenOffice in Linux needs an accompanying .afm file, and here's how to create the .afm file from the .pfb file:

  • Install t1lib, a library for generating character- and string-glyphs from Adobe Type 1 fonts: sudo apt-get install t1lib-bin

  • Go to the directory where the .pfb file was installed, e.g.: cd ~/.fonts

  • Create the .afm file, e.g.: type1afm fontfile.pfb


And that's all, starting OpenOffice should now show the font in the font selector.

Alternatively, the .afm file can go to a subdirectory named afm.

5 Kommentare:

Unknown hat gesagt…

Thank you SO much Steve!
Yesterday I didn't sleep until 4AM looking for this. I feared I had to do the same again tonight.

Thomas DA hat gesagt…

Btw. In fedora its: "yum install t1lib"

Steve hat gesagt…

You're welcome, glad I could help!

Raleigh St. Clair hat gesagt…

Thank you so much! I've been looking for a fix for hours, and this is the solution that finally worked!

I'm currently using OpenOffice 3.1 for Linux, with a base system of Slackware Linux v.13, Kernal 2.6.29.6. Thank you!

Steve hat gesagt…

Wow, amazing this is still helpful after nearly four years!