googlefonts / fontc

Where in we pursue oxidizing (context: https://github.com/googlefonts/oxidize) fontmake.
Apache License 2.0
85 stars 14 forks source link

[ttx_diff] set SOURCE_DATE_EPOCH to ensure head.modified and created are the same #1072

Closed anthrotype closed 3 weeks ago

anthrotype commented 3 weeks ago

In ttx_diff.py we already erased the head.modified, but we don't also erease the head.created. The latter is also set to the current time when the source does not contain an explicit openTypeHeadCreated (most do not). I have seen random ttx-diffs caused by the fact that sometimes fontc and fontmake builds differs by one or two seconds in the head.created.

For example this one in a recent run of fontc_crater:

Screenshot 2024-10-29 at 12 41 34

Since both compilers support the standard SOURCE_DATE_EPOCH variable for reproducible builds we may well make use of it here.