Batch TTX . . .

Hey All, I'm hoping one of you smart TTX users can give me a hand . . .

I need to run TTX on large folder full of fonts, just the basic OTF to TTX conversion . . . (to prepare for copyright filings, nothing sinister)

I'm on a Mac 10.6.8 and I am hoping some savvy Terminal user can advise the line of code I can use to make this happen.

Thanks kindly in advance and before you ask, I was unable to figure this out after some Google searches.


  • James PuckettJames Puckett Posts: 1,448
    You can run most command line utilities in a for loop:
    for i in ./*.otf ; do programName $i ; done

    In the above loop programName will run for each OpenType font in the directory. So just replace programName with TTX and the appropriate flags/switches to get the output you need. Back up the directory first in case you accidentally blow everything up.
  • Jeff KellemJeff Kellem Posts: 54
    If all you need to do is run ttx on each .otf file in the current directory, ttx handles multiple files. So, you could just do:

    ttx *.otf

    Then, there would be files like fontname.ttx produced for fontname.otf. ttx creates uniquely named output files, so if a .ttx file existed for that fontname, you would see fontname#1.ttx, for example.
  • Thanks all! I sincerely appreciate the help! One question however is that all the fonts and font families are contained within their own folders inside the larger folder. Rather than dump them all into a single folder, is there some way I can affect them recursively?
  • Mark SimonsonMark Simonson Posts: 836
    edited May 2013
    If you view the folder of font folders in list view in the Finder, tip down the disclosure triangle on all the folders to reveal their contents, and then select all of the fonts, but not the folders, you can drag all the font files at once into the Terminal window for ttx to process. (Note: You need to type ttx[space] in the Terminal window first.)
  • Thanks Mark!
  • Kent LewKent Lew Posts: 640
    And if you hold the option key while clicking the “expand” triangle of the parent folder, all the contained folders will be expanded at once.
Sign In or Register to comment.