verify NF as well

This commit is contained in:
subframe7536 2025-02-19 14:36:07 +08:00
parent 6cd86fc44e
commit 19879b945b
2 changed files with 8 additions and 1 deletions

View file

@ -1132,6 +1132,13 @@ def main():
drop_mac_names(build_option.output_ttf)
build_option.is_nf_built = True
verify_glyph_width(
font=TTFont(
joinPaths(build_option.output_nf, listdir(build_option.output_nf)[0])
),
expect_widths=font_config.get_valid_glyph_width_list(),
)
# =========================================================================================
# ==================================== Build CN =======================================
# =========================================================================================

View file

@ -192,7 +192,7 @@ def match_unicode_names(file_path: str) -> dict[str, str]:
# https://github.com/subframe7536/maple-font/issues/314
def verify_glyph_width(font: TTFont, expect_widths: list[int]):
print("Verify glyph width")
print("Verify glyph width...")
result: tuple[str, int] = []
for name in font.getGlyphOrder():
width, _ = font["hmtx"][name]