behdad/fonttools — pull request #174 by anthrotype (2014-09-26 10:44:38+00:00)
Title: [subset] default to ttx-style output filename, keep original extension or use '.woff'

I know there are some, like @schriftgestalt in another pull request (https://github.com/behdad/fonttools/pull/112), who don't like like the way that ttx handles output file names.

However, I think most users are by now used to that, and may like if other tools such as pyftsybset behave the same as ttx does. The function makeOutputFileName is already in there to use.

So, my suggestion would be, when no output filename is explicitly specified in the options, then try to save it in the input file's folder with the same name+extension; if it clashes with an existing filename, then append an incremental # until the output filename is unique.

Also, it'd be nice to have the extension 'woff' when that flavor is specified in the options, while keeping the original '.ttf' or '.otf' from the input filename. I'd use the current ".subset" only if the input file bear no extension at all.

But maybe these are just my personal preferences.