[merge] --input-file

This commit is contained in:
Jan Kučera 2024-01-07 16:40:05 +00:00
parent 8df24b1b1f
commit d975087ca2
2 changed files with 6 additions and 2 deletions

View File

@ -183,10 +183,13 @@ def main(args=None):
options = Options()
args = options.parse_opts(args)
fontfiles = []
if options.input_file:
with open(options.input_file) as inputfile:
fontfiles = [line.strip() for line in inputfile.readlines() if not line.lstrip().startswith("#")]
for g in args:
fontfiles.append(g)
if len(args) < 1:
if len(fontfiles) < 1:
print("usage: pyftmerge font... [--output-file=merged.ttf]", file=sys.stderr)
return 1

View File

@ -11,6 +11,7 @@ class Options(object):
self.verbose = False
self.timing = False
self.drop_tables = []
self.input_file = None
self.output_file = "merged.ttf"
self.set(**kwargs)