fonttools / fontbakery

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

Fix cmap changing in ttFont being checked #4709

Closed felipesanches closed 1 month ago

felipesanches commented 1 month ago

Fixed race condition / bug where the check would modify the cmap of the font being checked. Deep copies the ttFont so that the cmap modifications don't trip up other checks. In our case, I saw com.google.fonts/check/soft_dotted crash because the cmap was changed while it was being iterated through. For the nuance between copy and deepcopy, see: https://docs.python.org/3/library/copy.html

Props to @Hoolean for correctly guessing and then spotting this issue from an awful stack trace in a one-off error.

com.google.fonts/check/tabular_kerning On the Universal profile.

(issue #4697)