[varLib.avarPlanner] Add -o,--output-file
This commit is contained in:
parent
97fec8d6d4
commit
d5a0a9756b
@ -179,6 +179,12 @@ def main(args=None):
|
|||||||
type=str,
|
type=str,
|
||||||
help="Space-separate list of glyphs to use for sampling.",
|
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(
|
parser.add_argument(
|
||||||
"-p", "--plot", action="store_true", help="Plot the resulting mapping."
|
"-p", "--plot", action="store_true", help="Plot the resulting mapping."
|
||||||
)
|
)
|
||||||
@ -264,7 +270,10 @@ def main(args=None):
|
|||||||
log.info("Designspace snippet:")
|
log.info("Designspace snippet:")
|
||||||
print(designspaceSnippet)
|
print(designspaceSnippet)
|
||||||
|
|
||||||
|
if options.output_file is None:
|
||||||
outfile = makeOutputFileName(options.font, overWrite=True, suffix=".avar")
|
outfile = makeOutputFileName(options.font, overWrite=True, suffix=".avar")
|
||||||
|
else:
|
||||||
|
outfile = options.output_file
|
||||||
log.info("Saving %s", outfile)
|
log.info("Saving %s", outfile)
|
||||||
font.save(outfile)
|
font.save(outfile)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user