1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2024-12-19 20:12:52 +02:00

Merge pull request #439 from onokatio/fix-postscript-cid

Fix #412
This commit is contained in:
Ryan L McIntyre 2020-02-21 22:27:59 -08:00 committed by GitHub
commit 36d0708dc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,8 +105,12 @@ class font_patcher:
print("\nDone with Patch Sets, generating font...")
# the `PfEd-comments` flag is required for Fontforge to save '.comment' and '.fontlog'.
self.sourceFont.generate(self.args.outputdir + "/" + self.sourceFont.fullname + self.extension, flags=(str('opentype'), str('PfEd-comments')))
print("\nGenerated: {}".format(self.sourceFont.fullname))
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))
else:
self.sourceFont.generate(self.args.outputdir + "/" + self.sourceFont.cidfontname + self.extension, flags=(str('opentype'), str('PfEd-comments')))
print("\nGenerated: {}".format(self.sourceFont.fullname))
if self.args.postprocess:
subprocess.call([self.args.postprocess, self.args.outputdir + "/" + self.sourceFont.fullname + self.extension])
@ -264,7 +268,11 @@ class font_patcher:
familyname = fontname
# fullname (filename) can always use long/verbose font name, even in windows
fullname = self.sourceFont.fullname + verboseAdditionalFontNameSuffix
if self.sourceFont.fullname != None:
fullname = self.sourceFont.fullname + verboseAdditionalFontNameSuffix
else:
fullname = self.sourceFont.cidfontname + verboseAdditionalFontNameSuffix
fontname = fontname + additionalFontNameSuffix.replace(" ", "")
# let us try to get the 'style' from the font info in sfnt_names and fallback to the
@ -379,7 +387,10 @@ class font_patcher:
# TODO version not being set for all font types (e.g. ttf)
# print("Version was {}".format(sourceFont.version))
self.sourceFont.version += ";" + projectName + " " + version
if self.sourceFont.version != None:
self.sourceFont.version += ";" + projectName + " " + version
else:
self.sourceFont.version = str(self.sourceFont.cidversion) + ";" + projectName + " " + version
# print("Version now is {}".format(sourceFont.version))