From 6943a9189c5a60f04d8eef36bd09a7b76134ae3a Mon Sep 17 00:00:00 2001 From: themancalledjakob Date: Sun, 18 May 2025 17:22:48 +0200 Subject: [PATCH] fix shadowing variable --- butils.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/butils.py b/butils.py index 3158e2d..76cd32c 100644 --- a/butils.py +++ b/butils.py @@ -511,17 +511,17 @@ def load_font_from_filepath(filepath, glyphs="", font_name="", face_name=""): modified_font_faces.append({"font_name": font_name, "face_name": face_name}) for mff in modified_font_faces: - glyphs = [] + mff_glyphs = [] face = Font.fonts[mff["font_name"]].faces[mff["face_name"]] # iterate glyphs for g in face.glyphs: # iterate alternates for glyph in face.glyphs[g]: - glyphs.append(get_original(glyph)) - if len(glyphs) > 0: - add_default_metrics_to_objects(glyphs) + mff_glyphs.append(get_original(glyph)) + if len(mff_glyphs) > 0: + add_default_metrics_to_objects(mff_glyphs) # calculate unit factor - h = get_glyph_height(glyphs[0]) + h = get_glyph_height(mff_glyphs[0]) if h != 0: face.unit_factor = 1 / h