Skip to content

Commit

Permalink
font-patcher: Fix ligature removal
Browse files Browse the repository at this point in the history
[why]
Only one tables is removed, even if we want to remove more.

With 0a480bb the indentation of the code has changed, and now the loop
is (apart from printing) empty. See also #934

[how]
Re-indent the lines to restore functionality as originally forseen with
commit 557fc00.

Reported-by: Rádler Ákos <akos.radler@gmail.com>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
  • Loading branch information
Finii committed Sep 22, 2022
1 parent 46a7c03 commit 5d218b1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions font-patcher
Original file line number Diff line number Diff line change
Expand Up @@ -667,11 +667,11 @@ class font_patcher:
ligature_subtables = json.loads(self.config.get("Subtables", "ligatures"))
for subtable in ligature_subtables:
print("Removing subtable:", subtable)
try:
self.sourceFont.removeLookupSubtable(subtable)
print("Successfully removed subtable:", subtable)
except Exception:
print("Failed to remove subtable:", subtable)
try:
self.sourceFont.removeLookupSubtable(subtable)
print("Successfully removed subtable:", subtable)
except Exception:
print("Failed to remove subtable:", subtable)
elif self.args.removeligatures:
print("Unable to read configfile, unable to remove ligatures")
else:
Expand Down

0 comments on commit 5d218b1

Please sign in to comment.