verify NF as well
This commit is contained in:
parent
6cd86fc44e
commit
19879b945b
2 changed files with 8 additions and 1 deletions
7
build.py
7
build.py
|
@ -1132,6 +1132,13 @@ def main():
|
||||||
drop_mac_names(build_option.output_ttf)
|
drop_mac_names(build_option.output_ttf)
|
||||||
build_option.is_nf_built = True
|
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 =======================================
|
# ==================================== Build CN =======================================
|
||||||
# =========================================================================================
|
# =========================================================================================
|
||||||
|
|
|
@ -192,7 +192,7 @@ def match_unicode_names(file_path: str) -> dict[str, str]:
|
||||||
|
|
||||||
# https://github.com/subframe7536/maple-font/issues/314
|
# https://github.com/subframe7536/maple-font/issues/314
|
||||||
def verify_glyph_width(font: TTFont, expect_widths: list[int]):
|
def verify_glyph_width(font: TTFont, expect_widths: list[int]):
|
||||||
print("Verify glyph width")
|
print("Verify glyph width...")
|
||||||
result: tuple[str, int] = []
|
result: tuple[str, int] = []
|
||||||
for name in font.getGlyphOrder():
|
for name in font.getGlyphOrder():
|
||||||
width, _ = font["hmtx"][name]
|
width, _ = font["hmtx"][name]
|
||||||
|
|
Loading…
Reference in a new issue