[subset] when no --output-file=, use INPUT_FILE.subset.{extension}
We should probably use cliTools.makeOutputFileName here for consistency with ttx, but I know some prefer the approach taken by pyftsubset so I don't want force this. Howver, I find it a bit annoying that when one is too lazy (like me) to specify the --output-file=, the subsetter outputs a file ending with an invalid ".subset" extension, which Finder or Windows Explorer don't recongize as a font, and so one has to rename it anyway. This makes the '.subset' string is inserted between the file name and its original extension (if any).
This commit is contained in:
parent
f168c0ccb5
commit
c63fea0f8f
@ -2866,6 +2866,7 @@ def usage():
|
||||
|
||||
@timer("make one with everything (TOTAL TIME)")
|
||||
def main(args=None):
|
||||
from os.path import splitext
|
||||
from fontTools import configLogger
|
||||
|
||||
if args is None:
|
||||
@ -2902,7 +2903,8 @@ def main(args=None):
|
||||
args = args[1:]
|
||||
|
||||
subsetter = Subsetter(options=options)
|
||||
outfile = fontfile + '.subset'
|
||||
basename, extension = splitext(fontfile)
|
||||
outfile = basename + '.subset' + extension
|
||||
glyphs = []
|
||||
gids = []
|
||||
unicodes = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user