Ubuntu: Convert mac .dfont files into .ttf using Fondu

I was working on a project where I needed Helvetica fonts on my Ubuntu box. Helvetica fonts are on my mac, but stored in a .dfont file (System/Library/Fonts). First I copied the Helvetica.font to my Ubuntu box (I placed them in my home directory). I then installed Fondu.

sudo apt-get install fondu

Now navigate to where you copied the .dfont file and enter:

fondu Helvetica.dfont

The dfont file will be converted to .ttf files. Depending on the font type, this will create multiple .ttf files.

Copying Fonts to Font Directory

Now you can move the .ttf files into the font directory (/usr/share/fonts/truetype).

This was not as easy as I thought. I opened the file browser and tried to copy/paste the fonts into the fonts directory, but I received a permission denied error because I was not root.

Open terminal (Application->Accessories->Terminal).

gksu nautilus /usr/share/fonts/truetype

Using ‘gksu’ will open the file browser with root privileges. Now open another file browser to the location where you copied your fonts to:

gksu nautilus /home/les/

Now both are opened with root privileges. Now just drag/drop the files into the font directory.

Note: You may have to create a folder with the font name first. If you only have a single font file, then you can just copy it into the Truetype directory (or the appropriate directory – opentype, etc). If you have multiple font files (Helvetica.ttf, HelveticaBold.ttf, etc), then you should first create a folder named helvetica under the TrueType folder and then copy all helvetica files under the helvetica directory.

That’s it.

Be Sociable, Share!

Checkout My New Site - T-shirts For Geeks