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` under test #4706

Closed RickyDaMa closed 1 month ago

RickyDaMa commented 1 month ago

Description

Relates to race condition issues with --auto-jobs

Deep copies the ttFont in com.google.fonts/check/tabular_kerning so the cmap modifications don't trip up other tests. 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

Checklist

felipesanches commented 1 month ago

This will resume at PR #4709