From ffcfadfc3ce0ee35166baa3e2f8d6df2fee7f3a4 Mon Sep 17 00:00:00 2001 From: Colin Rofls Date: Tue, 12 Nov 2024 16:41:15 -0500 Subject: [PATCH] [ttx_diff] Only report size issues if fontc > fontmake If we're smaller and the ttx is equivalent, that seems fine. --- resources/scripts/ttx_diff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/scripts/ttx_diff.py b/resources/scripts/ttx_diff.py index 8466d35c..8e3d1539 100755 --- a/resources/scripts/ttx_diff.py +++ b/resources/scripts/ttx_diff.py @@ -513,7 +513,7 @@ def check_sizes(fontmake_ttf: Path, fontc_ttf: Path): for key in shared_keys: fontmake_len = fontmake[key] fontc_len = fontc[key] - len_ratio = min(fontc_len, fontmake_len) / max(fontc_len, fontmake_len) + len_ratio = fontc_len / fontmake_len if (1 - len_ratio) > THRESHOLD: rel_len = fontc_len - fontmake_len eprint(f"{key} {fontmake_len} {fontc_len} {len_ratio:.3} {rel_len}")