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!"
Comments
for i in ./*.otf ; do autohint -a $i ; done