Installing TTX for the command-line challenged

Posted by scottstoel on March 21, 2011 at 3:26 pm.

In an earlier post, we showed you how to use TTX, an open source font editor, to rename a font in order to avoid font conflicts. This can be helpful because your operating system and your applications recognize fonts by name and name alone, and on occasion you may need to activate a font which conflicts with an installed system font. So even if you have two very different versions of a font, but they have the same name, the operating system cannot discern between them.

The biggest hurdle for most people, is that TTX is a command line tool, which adds one layer of difficulty, but the method of installation, which is very obvious to those acquainted with Python, is not readily apparent to the technologically challenged. But once the steps are explained, and carefully followed, you will get access to a powerful tool for editing fonts.

Why TTX?

First, TTX is free.

Secondly, when you process your fonts using TTX, there is no behind the scenes mystery to what is happening with the fonts. TTX is a tool to convert OpenType and TrueType fonts to and from XML. You could use tools like FontLab Studio or Fontographer to make changes to your fonts, but it is not always transparent what is happening to your fonts during this process. In short, changes made in those applications may include something you not readily apparent in the processed font. TTX is the least invasive option for those seeking to make simple (and sometimes very complex) changes in your font files.

Getting started

First you will need to have Xcode installed, and a download link to the version you require can be found here. Make sure you download the correct version for your OS, as the development tools for Snow Leopard cannot be installed on Leopard.

Then download TTX. A link to the files needed can be found here. Once downloaded, decompress the file and move the folder to the root level of your hard drive.

Next, launch Terminal, which can be found in the Utilities folder in your Applications folder.

Then at the prompt type “cd” (no quotes) and a space, then drag the fonttools folder onto the Terminal window. Terminal will automatically add the path to the folder, which saves us from possible typing errors. What you entered should look something like the line below:

cd /fonttools-2.3\ 3

If you would like to see a list of the contents of the folder in Terminal, just type “ls” (once again, no quotes) at the prompt, or just open the folder in Finder.

Now in Terminal, type the line below (or copy and paste)

sudo python setup.py install

What this command does is run the installer in the fonttools folder (setup.py). The command “sudo” (pronounced soo-doo) means you are running the command as the superuser, which is a special user account used to administer your Mac (or any Unix/Linux system). Because you are running the command as the superuser, you will be required to enter an administrator password. The item “install” is an option telling the setup script what to do.

After you have the command inserted at the prompt, hit return, then enter your password and hit return again.

If all is well, the Terminal will spit back a bunch of information describing what the script is doing, mainly that it is moving files to the locations needed to run TTX.

You are ready to roll

Once installed, your are ready to run TTX. To find out the options you can use with TTX, just type in “ttx” (still no quotes) in Terminal and it will list them all.

There are a lot of things you can do with TTX, including the post mentioned earlier on how to rename fonts with TTX here.

Hopefully, this article lowered a barrier of entry for those looking to work with TTX. It is a powerful tool, and like all powerful tools, it gives you the capability of really messing things up, so always back up your font files before getting too deep in editing them.