Skip to content

Commit

Permalink
[ttVisitor] Pass arbitrary args
Browse files Browse the repository at this point in the history
  • Loading branch information
behdad committed Aug 15, 2022
1 parent e285088 commit 6af0637
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lib/fontTools/ttLib/ttVisitor.py
Expand Up @@ -17,11 +17,11 @@ def visit(self, obj, *args, **kwargs):


@TTVisitor.register(TTFont)
def visit(visitor, font):
def visit(visitor, font, *args, **kwargs):
if hasattr(visitor, "font"):
return False
visitor.font = font
for tag in font.keys():
visitor.visit(font[tag])
visitor.visit(font[tag], *args, **kwargs)
del visitor.font
return False

0 comments on commit 6af0637

Please sign in to comment.