justvanrossum / fbdiff

Tool to show a brief summary of table differences in OpenType fonts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

comparing woff2’s doesn't work for me

ddaanniiieeelll opened this issue · comments

I’m using this fantastic tool super often, however today I tried to compare two .WOFF2 files and it did not like it at all.

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/bin/fbdiff", line 8, in <module> sys.exit(main()) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/fbdiff.py", line 57, in main if font_A.reader.tables[tag].checkSum == font_B.reader.tables[tag].checkSum: AttributeError: 'WOFF2DirectoryEntry' object has no attribute 'checkSum'

I am not sure what to make out of this. I’m also not sure if the comparison between woff2 files is intended (or possible(?)) but since it works fine with a woff I thought woff2 shouldn’t be a problem.

If there are obvious reasons why this doesn’t work I’m happy to learn it, if not, it would be cool if comparison of woff2 files could be possible in the future.

TIA :)

Oh, you can comment out that line and the next, that may just work. Can you confirm?

Yes, that worked.
Thanks :)

Thanks, I'll update and push a new release. (keeping the issue open until I did)

Messily fixed in 7b0eeaa, mess fixed in 5c47758