tip: convert mac fonts for linux

Converting mac fonts to linux sucks. Read on.

Mac fonts are stored in the most inane format ever. If you try to copy a font file from a mac you’ll probably get a 0 byte file. That’s because mac stores fonts in two files: the first is an empty file with the name you see, like FrankGotBoo, and the other is a hidden file that actually contains the data, called ._FrankGotBoo. I have no idea why they have one empty file and a corresponding hidden file, but that’s the way it is.

To convert the file to a format linux can use, get the t1utils package for your system. Do:

t1unmac -a ._YourFont > YourFont.pfa
pf2afm YourFont.pfa
Copy YourFont.* to your ~/.fonts directory.
Reload the font server with /etc/init.d/xfs reload.

Your font should now show up in Gimp and can be installed to Open Office with oopadmin.

I had some problems with my ITC Franklin Gothic fonts in that gimp kept on using the bold version for any instance of a Franklin Gothic font. So ITC Franklin Gothic Demi Oblique would just be the bold version. And Book would be bold too. The solution here was to rename every instance of “ITC Franklin Gothic” in the pfa file with the name I wanted to show up in gimp. I think the key was the “Family Name” which was identical for all of the pfa files. Once I changed those, it worked. Make sure to delete old .pfa~ files, they screw things up too.