fix shadowing variable
This commit is contained in:
parent
d88c0c50cd
commit
6943a9189c
1 changed files with 5 additions and 5 deletions
10
butils.py
10
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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue