From d25fd9b8120af88ee0d30bd283a2e650847e6b26 Mon Sep 17 00:00:00 2001 From: Colin Rofls Date: Tue, 11 Feb 2025 10:29:05 -0500 Subject: [PATCH] [ttx_diff] Fix a pair of little things - we weren't always deleting ligcaret output, which means that when running locally, it was being reused between different fonts. - fixed a python warning about checking for None --- resources/scripts/ttx_diff.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/scripts/ttx_diff.py b/resources/scripts/ttx_diff.py index ebeb8c35..03c95985 100755 --- a/resources/scripts/ttx_diff.py +++ b/resources/scripts/ttx_diff.py @@ -516,7 +516,7 @@ def remove_gdef_lig_caret_and_var_store(ttx: etree.ElementTree): for ident in ["LigCaretList", "VarStore"]: subtable = gdef.find(ident) - if subtable: + if subtable is not None: gdef.remove(subtable) @@ -771,6 +771,7 @@ def delete_things_we_must_rebuild(rebuild: str, fontmake_ttf: Path, fontc_ttf: P ttf_path, ttf_path.with_suffix(".ttx"), ttf_path.with_suffix(".markkern.txt"), + ttf_path.with_suffix(".ligcaret.txt"), ]: if path.exists(): os.remove(path)