[varLib.avarPlanner] Add -o,--output-file

This commit is contained in:
Behdad Esfahbod 2023-07-23 11:31:14 -06:00
parent 97fec8d6d4
commit d5a0a9756b

View File

@ -179,6 +179,12 @@ def main(args=None):
type=str,
help="Space-separate list of glyphs to use for sampling.",
)
parser.add_argument(
"-o",
"--output-file",
type=str,
help="Output font file name.",
)
parser.add_argument(
"-p", "--plot", action="store_true", help="Plot the resulting mapping."
)
@ -264,7 +270,10 @@ def main(args=None):
log.info("Designspace snippet:")
print(designspaceSnippet)
if options.output_file is None:
outfile = makeOutputFileName(options.font, overWrite=True, suffix=".avar")
else:
outfile = options.output_file
log.info("Saving %s", outfile)
font.save(outfile)