Closed pelson closed 7 years ago
Hmmm. This is still producing a diff at each re-build, but sfddiff doesn't see any difference. This is a slightly gnarly-er problem than I'd hoped...
Turns out my creation time and my xuid are both being modified each time the script is run. Apparently xuid is no longer necessary (NOTE: Adobe now says that both XUID and UniqueID are unnecessary.
).
Unfortunately, I'm struggling to find a clear way to set the creationtime. I'm looking specifically at https://github.com/fontforge/fontforge/pull/2609.
Phew. I think I've got it, after tweaking the stat time of the sfd file. I've pushed the commit up, if travis pushes a second commit to my branch I've failed, otherwise, this should be good to go. (I'm signing out for a bit)
This is now good to go, though I'm reluctant to self-merge. Anybody?
Incidentally, (i.e. for my own record) I used the following to print out all attributes of a ttf (they weren't all being diffed by sdfdiff - namely xuid and creationtime):
import fontforge
import sys
font = fontforge.open(sys.argv[1])
seen = []
for k in dir(font):
if k in seen:
continue
seen.append(k)
v = getattr(font, k)
if not k.startswith('_') and not callable(v):
print(k, v)
Currently, it seems the ttf depends on the day. I modified the (pretty well hidden) "UniqueID" field so that it doesn't include the date.
Incidentally, to diff a ttf/otf/woff/sfd or any other type of font that fontforge can read, you can simply use the sfddiff tool. Even better, it is included in the docker image I built,
pelson/fontbuilder
.In this instance:
Note that in my instance, I needed to make the location of my temporary directory readable from within the docker container, so I set
export TMPDIR=.diff-tmp; mkdir -p $TMPDIR
.