I made a script using Robofab’s DigestPointPen function… https://raw.githubusercontent.com/weiweihuanghuang/wei-glyphs-scripts/master/Compare%20Fonts.py
But i was wondering if there’s a way to do that just using Glyphs App native functions.
p1 = DigestPointPen() g1.drawPoints(p1) d1 = p1.getDigest() p2 = DigestPointPen() g2.drawPoints(p2) d2 = p2.getDigest() if d1 != d2:
You could just step through all paths and nodes like in my gspy snippet, and collect all info.
gspy
There is a convenience function roughly equivalent to the DigestPointStructurePen though, intended for verifying compatibility: GSLayer.compareString()
DigestPointStructurePen
GSLayer.compareString()
Oh thanks, I’ll check it out, would the compareString() check that all the points are the same though?
No. It just gives you information about the structure like this: oocoocoocoocooc_oocoocoocloocoocoocoocoocoocoocoocooc_