3 min read

Reading fonts from a Mac CDROM and converting them to TrueType

A few years back, I bought a bunch of Macintosh fonts on a CD-ROM. Recently, I decided I wanted to use them with Ubuntu. Since the Mac CD was HPFS only and very scratched, here’s what I ended up doing.

First, I installed the Ubuntu utilities for Mac HPFS: sudo aptitude install macutils hfs

Then I tried just mounting the file system: sudo mount -thfs /dev/cdrom /mnt/cdrom/

That probably would have worked, but my CD was so scratched that it kept dying. (Also, I don’t know if copying from a mounted HFS file system copies both forks of the Apple file.)

Luckily, I was able to use the mounted file system to get a ls -lR listing of the files on the disk. That made it easier to use the excellent hfs utils:

sudo aptitude install hftutils

Then I could: hmount /dev/cdrom hcd TRUETYPE hcopy -b MyFont.suit /tmp/MyFont.hqx

I wrote a script to copy the files over. Once I had the files over, I could convert them manually using fontforge (from fontforge.sourceforge.net). Basically, you do: sudo aptitude install fontforge fontforge MyFont.hqx and then File -> Generate Fonts -> Save (after making sure TTF is selected).

It turns out fontforge is overkill - and also harder to script - than fondu.

sudo aptitude install fondu fondu *.hqx

Here are some useful sources of information:

A discussion of font utilities: ubuntuforums.org/showthread.php?t=314837

The easy way: using fondu: ubuntu-tutorials.com/2006/12/13/convert-mac-based-fonts-for-use-on-ubuntu-ubuntu-6061-610/

Converting from one outline font (e.g. PostScript) to another (e.g. TrueType): fontforge.sourceforge.net/faq.html#outline-conversion

Once you have the fonts in TTF format, you can copy them to ~/.fonts/ (or use the File Browser to open the Font Viewer and then press the Install button if you’re GUI) to install on Ubuntu.

For Windows, just drag & drop the font to C:\WINNT\Fonts or C:\WINDOWS\Fonts depending on your system.

Incidentally, if you’re looking for a particular font or lookalike, you’ll probably find it here: www.fonts101.com