less print
This commit is contained in:
parent
167dea8164
commit
f046546e61
1 changed files with 5 additions and 8 deletions
|
@ -85,7 +85,6 @@ def is_space(character):
|
|||
|
||||
|
||||
def generate_from_file_d(filepath):
|
||||
print(f"{filepath=}")
|
||||
d = {}
|
||||
with open(filepath) as f:
|
||||
for line in f:
|
||||
|
@ -96,14 +95,12 @@ def generate_from_file_d(filepath):
|
|||
(name, hexstr) = line.split(' ')
|
||||
val = chr(int(hexstr, base=16))
|
||||
d[name] = val
|
||||
print(f"{name=} {val=}")
|
||||
if len(split) == 3:
|
||||
# we might have a parameter, like for the spaces
|
||||
(name, hexstr, parameter) = line.split(' ')
|
||||
parameter_value = float(parameter)
|
||||
val = chr(int(hexstr, base=16))
|
||||
d[name] = [val, parameter_value]
|
||||
print(f"{name=} {val=}, {parameter_value=}, {parameter_value * 2}")
|
||||
return d
|
||||
|
||||
def generate_name_to_glyph_d():
|
||||
|
@ -206,19 +203,19 @@ def get_glyph(font_name, face_name, glyph_id, alternate=0):
|
|||
"""
|
||||
|
||||
if not fonts.keys().__contains__(font_name):
|
||||
print(f"ABC3D::get_glyph: font name({font_name}) not found")
|
||||
print(fonts.keys())
|
||||
# print(f"ABC3D::get_glyph: font name({font_name}) not found")
|
||||
# print(fonts.keys())
|
||||
return None
|
||||
|
||||
face = fonts[font_name].faces.get(face_name)
|
||||
if face == None:
|
||||
print(f"ABC3D::get_glyph: font({font_name}) face({face_name}) not found")
|
||||
print(fonts[font_name].faces.keys())
|
||||
# print(f"ABC3D::get_glyph: font({font_name}) face({face_name}) not found")
|
||||
# print(fonts[font_name].faces.keys())
|
||||
return None
|
||||
|
||||
glyphs_for_id = face.glyphs.get(glyph_id)
|
||||
if glyphs_for_id == None or len(glyphs_for_id) <= alternate:
|
||||
print(f"ABC3D::get_glyph: font({font_name}) face({face_name}) glyph({glyph_id})[{alternate}] not found")
|
||||
# print(f"ABC3D::get_glyph: font({font_name}) face({face_name}) glyph({glyph_id})[{alternate}] not found")
|
||||
if glyph_id not in fonts[font_name].faces[face_name].missing_glyphs:
|
||||
fonts[font_name].faces[face_name].missing_glyphs.append(glyph_id)
|
||||
return None
|
||||
|
|
Loading…
Reference in a new issue