Convert Open Type fonts to True Type

FontForge, a multi-platform font editor, allows you to create and modify postscript, truetype and opentype fonts. You can save fonts in many different outline formats, and generate bitmaps.
We'll use it here to convert one format to another.

Convert Open Type to True Type with FontForge

On Ubuntu systems, we can create a conversion script, that does the conversion automatically. Paste the following in your favourite shell
sudo -v
# Make sure with have fontforge installed on our system
sudo aptitude install fontforge
echo '#!/usr/bin/fontforge
# Quick and dirty hack: converts a font to truetype (.ttf)
Print("Opening "+$1);
Print("Saving "+$1:r+".ttf");
Quit(0);' >
chmod a+x

## The following lines are examples of the usage:
# Convert MyFont from Open Type to True Type in the same location:
# ./ MyFont.otf
# Convert all Open Type fonts of the current folder:
# for font in $(ls *.otf); do ./ $font; done
# Convert all Open Type fonts even in subfolders:
# find . -name *.otf -exec ./ {} \;
Note: I found the original script in this blog, but mine has slightly changes to be called directly.

FontForge can also be used on Windows systems, but I have no instructions for doing the conversion automatically, so you'll have to load the font and then store it again in the TrueType format.

In the next post we'll see how to install True Type fonts in our Ubuntu system.