From 7a31c67670fcc99c362193fac8af619fb33ba635 Mon Sep 17 00:00:00 2001 From: Fini Jastrow Date: Sun, 4 Jun 2023 10:02:24 +0200 Subject: [PATCH] font-patcher: Fix wrong data source [why] For tweaking we use the self.sourceFont, but in the loop the real correct value is the local sourceFont. Usually it's the same, but from a logical standpoint this is wrong. The name is a bit unfortunate and C++ would have generated a warning. Signed-off-by: Fini Jastrow --- font-patcher | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/font-patcher b/font-patcher index 9333d6302..f1cc8538d 100755 --- a/font-patcher +++ b/font-patcher @@ -433,14 +433,14 @@ class font_patcher: sanitize_filename(self.args.outputdir, True), sanitize_filename(fontname) + self.args.extension)) bitmaps = str() - if len(self.sourceFont.bitmapSizes): - logger.debug("Preserving bitmaps %s", repr(self.sourceFont.bitmapSizes)) + if len(sourceFont.bitmapSizes): + logger.debug("Preserving bitmaps %s", repr(sourceFont.bitmapSizes)) bitmaps = str('otf') # otf/ttf, both is bf_ttf if self.args.dry_run: logger.debug("=====> Filename '%s'", outfile) return sourceFont.generate(outfile, bitmap_type=bitmaps, flags=gen_flags) - message = " {}\n \===> '{}'".format(self.sourceFont.fullname, outfile) + message = " {}\n \===> '{}'".format(sourceFont.fullname, outfile) # Adjust flags that can not be changed via fontforge if re.search('\\.[ot]tf$', self.args.font, re.IGNORECASE) and re.search('\\.[ot]tf$', outfile, re.IGNORECASE):