use glyph name instead of id

This commit is contained in:
subframe7536 2025-02-19 16:33:18 +08:00
parent 97ddc901b8
commit 5add635649

View file

@ -194,7 +194,7 @@ def match_unicode_names(file_path: str) -> dict[str, str]:
def verify_glyph_width(font: TTFont, expect_widths: list[int], forgive: bool):
print("Verify glyph width...")
result: tuple[str, int] = []
for name in font.getGlyphOrder():
for name in font.getGlyphNames():
width, _ = font["hmtx"][name]
if width not in expect_widths:
result.append([name, width])