Typophile

AFDKO autohint on a command line

paragraph

Pls forgive this old fogey if this has been answered before: Does the authohint script accept wildcards (or a directory) or does it have to be entered again for each font? Also, should I always run it with the -a switch to replace the FLS5 hints altogether?

I had trouble running it with wildcards so I run it in a loop:
for i in ./*.otf ; do autohint -a $i > $i.log ; done

James Puckett

"for i in ./*.otf ; do autohint -a $i > $i.log ; done"

Which scripting language is that? Batch for the Mac?

That’s just simple bourne/korn/bash scripting. You can run it at the command line.

"You can run it at the command line."

But probably not on a native Windows.

My batch scripts (Windows):

@echo off
call FDKvars
copy Input\*.* Output
cd %FDK%
for %%f in (%~dp0Output\*.otf; %~dp0Output\*.pfb; %~dp0Output\*.pfa) do %autohintCom% -q -a "%%f"

While FDKvars.bat is:

@echo off
set "FDK=C:\FDK_25_21898\Tools\win"
set "autohintCom=autohint.cmd"

The folder, that contains the two batch files, must also contain the folders "Input" and "Output".

I have created the FDKvars.bat, because now I only have to make slight corrections in that file, when Adobe updates the FDK. And I renamed the folder FDK to FDK_25_21898, because I am using three versions of the FDK at the moment.

paragraph

Remember to deactivate the FLS option "Use subroutines to compress outlines in CFF table".

"Also, should I always run it with the -a switch to replace the FLS5 hints altogether?"

Well, I prefer to remove all hints in FLS, before I autohint a font, but if you don’t remove them, it should be the -r option, shouldn’t it? I am not sure at the moment, because the autohint help says "has effect only, if the history file is being used."

Thanks, Arno. James, your tidbit works like a charm! I'll have to buy you a drink sometime :)

That’s just simple bourne/korn/bash scripting. You can run it at the command line.

... on Unix/Linux/Mac. Not Windows.

And do put the word "shell" in after "bourne/korn/bash."

Cheers,

T

Captured from web.archive.org on 3 Feb 2010. view this capture