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 -vNote: I found the original script in this blog, but mine has slightly changes to be called directly.
# 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);
Open($1);
Print("Saving "+$1:r+".ttf");
Generate($1:r+".ttf");
Quit(0);' > otf2ttf.sh
chmod a+x otf2ttf.sh
## The following lines are examples of the usage:
#
# Convert MyFont from Open Type to True Type in the same location:
# ./otf2ttf.sh MyFont.otf
#
# Convert all Open Type fonts of the current folder:
# for font in $(ls *.otf); do ./otf2ttf.sh $font; done
#
# Convert all Open Type fonts even in subfolders:
# find . -name *.otf -exec ./otf2ttf.sh {} \;
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.
I appreciate this very helpful post. You have mentioned some information about to convert open-type-fonts to true-type.
ReplyDeleteThank you so much for sharing.