A simple script to batch process fonts with AFDK autohint
Ramiro Espinoza
Posts: 839
A colleague asked me today for a script to run AFDK autohint on a set of fonts. Here is my perfectible but usable script if someone want to run it. It can be easily adapted to run others AFDK programs like TTX.
import os
root = '/Users/You/Desktop/Fonts2Hint' #Copy your input directory here
new_root = "mkdir " + root +"/Hinted-Fonts"
os.system(new_root)
allfiles = os.listdir(root)
for n in allfiles:
if not n.startswith('.'):
duplicate_file = "cp "+root+"/"+n +" "+root+"/"+"HINTED-"+ n
os.system(duplicate_file)
move_files = "mv " + root + "/HINTED-*" +" "+ root+"/Hinted-Fonts/"
os.system(move_files)
run_AFDK_PS1Hinter = "autohint -a " + root+"/Hinted-Fonts/"+"HINTED-"+ n
os.system(run_AFDK_PS1Hinter)
print "READY!"
Tagged:
0
Comments
-
Adobe’s auto hinter runs fine in a command-line loop:
for i in ./*.otf ; do autohint -a $i ; done1
Categories
- All Categories
- 46 Introductions
- 3.9K Typeface Design
- 485 Type Design Critiques
- 560 Type Design Software
- 1.1K Type Design Technique & Theory
- 654 Type Business
- 852 Font Technology
- 29 Punchcutting
- 519 Typography
- 119 Type Education
- 323 Type History
- 77 Type Resources
- 112 Lettering and Calligraphy
- 33 Lettering Critiques
- 79 Lettering Technique & Theory
- 549 Announcements
- 91 Events
- 114 Job Postings
- 170 Type Releases
- 173 Miscellaneous News
- 276 About TypeDrawers
- 54 TypeDrawers Announcements
- 120 Suggestions and Bug Reports
