fonttools / fontbakery

🧁 A font quality assurance tool for everyone
https://fontbakery.readthedocs.io
Apache License 2.0
534 stars 99 forks source link

Fix #4671: prevent one test util from changing the ttFont in place #4678

Closed belluzj closed 2 months ago

belluzj commented 2 months ago

Because that was making other test utils fail on the modified font.

Description

Fixes issue #4671

I didn't change the spirit of what iterate_lookup_list_with_extensions does, but made sure with a try/finally that its changes to the ttFont are undone as soon as the callback returns.

Checklist