From 0d905e2293ca3e818b1b4d538bf3e0e31817fab5 Mon Sep 17 00:00:00 2001 From: Fini Jastrow Date: Mon, 29 Nov 2021 10:04:40 +0100 Subject: [PATCH] font-patcher: Set SFNT Version [why] The Nerd Font Version is not added to the SFNT Version. This is also a TODO item in `font-patcher`. The SFNT-Revision is not updated at all. [how] Set the SFNT Version and Revision. Signed-off-by: Fini Jastrow --- font-patcher | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/font-patcher b/font-patcher index dfb8630e3..b1db880e7 100755 --- a/font-patcher +++ b/font-patcher @@ -401,12 +401,13 @@ class font_patcher: self.sourceFont.comment = projectInfo self.sourceFont.fontlog = projectInfo - # TODO version not being set for all font types (e.g. ttf) # print("Version was {}".format(sourceFont.version)) if self.sourceFont.version != None: self.sourceFont.version += ";" + projectName + " " + version else: self.sourceFont.version = str(self.sourceFont.cidversion) + ";" + projectName + " " + version + self.sourceFont.sfntRevision = None # Auto-set (refreshed) by fontforge + self.sourceFont.appendSFNTName(str('English (US)'), str('Version'), "Version " + self.sourceFont.version) # print("Version now is {}".format(sourceFont.version))