From 19879b945bf4a274645930b03f1d195104bbb303 Mon Sep 17 00:00:00 2001 From: subframe7536 <1667077010@qq.com> Date: Wed, 19 Feb 2025 14:36:07 +0800 Subject: [PATCH] verify NF as well --- build.py | 7 +++++++ source/py/utils.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/build.py b/build.py index 000f491..f986c4f 100755 --- a/build.py +++ b/build.py @@ -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 ======================================= # ========================================================================================= diff --git a/source/py/utils.py b/source/py/utils.py index 46039e2..4f45a7a 100644 --- a/source/py/utils.py +++ b/source/py/utils.py @@ -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]