mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2025-01-31 12:27:22 +02:00
font-patcher: Fix wrong argument for postprocess
[why] When the patched font does not have a fullname (which can never happen) the postprocess is called with a wrong filename. [note] Also output the file name of the patched font, for easier access by the user. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
parent
89907120d9
commit
85324cc59a
14
font-patcher
14
font-patcher
@ -135,15 +135,17 @@ class font_patcher:
|
||||
|
||||
# the `PfEd-comments` flag is required for Fontforge to save '.comment' and '.fontlog'.
|
||||
if self.sourceFont.fullname != None:
|
||||
self.sourceFont.generate(self.args.outputdir + "/" + self.sourceFont.fullname + self.extension, flags=(str('opentype'), str('PfEd-comments')))
|
||||
print("\nGenerated: {}".format(self.sourceFont.fontname))
|
||||
outfile = self.args.outputdir + "/" + self.sourceFont.fullname + self.extension
|
||||
self.sourceFont.generate(outfile, flags=(str('opentype'), str('PfEd-comments')))
|
||||
print("\nGenerated: {} in {}".format(self.sourceFont.fontname, outfile))
|
||||
else:
|
||||
self.sourceFont.generate(self.args.outputdir + "/" + self.sourceFont.cidfontname + self.extension, flags=(str('opentype'), str('PfEd-comments')))
|
||||
print("\nGenerated: {}".format(self.sourceFont.fullname))
|
||||
outfile = self.sourceFont.generate(self.args.outputdir + "/" + self.sourceFont.cidfontname + self.extension
|
||||
self.sourceFont.generate(outfile, flags=(str('opentype'), str('PfEd-comments')))
|
||||
print("\nGenerated: {} in {}".format(self.sourceFont.fullname, outfile))
|
||||
|
||||
if self.args.postprocess:
|
||||
subprocess.call([self.args.postprocess, self.args.outputdir + "/" + self.sourceFont.fullname + self.extension])
|
||||
print("\nPost Processed: {}".format(self.sourceFont.fullname))
|
||||
subprocess.call([self.args.postprocess, outfile])
|
||||
print("\nPost Processed: {}".format(outfile))
|
||||
|
||||
|
||||
def setup_arguments(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user