Skip to content

Commit

Permalink
[ttx_diff] Fix a pair of little things
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
cmyr committed Feb 11, 2025
1 parent 1c27696 commit d25fd9b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/scripts/ttx_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit d25fd9b

Please sign in to comment.