Robofab wrapper problem — DigestPointPen

I have a script that uses the DigestPointPen to compare versions of Glyphs app, now it doesn’t work properly anymore. I duplicate a file and try to compare the glyphs’ DigestPointPens and they are for some reason different.

Here’s a shorter script to run in the macro window:

from robofab.pens.digestPen import DigestPointPen
from robofab.world import AllFonts, CurrentGlyph

Glyphs.clearLog()

fonts = AllFonts()
f1 = fonts[0]
f2 = fonts[1]

g1 = f1['ring']
g2 = f2['ring']

p1 = DigestPointPen()
g1.drawPoints(p1)
d1 = p1.getDigest()

p2 = DigestPointPen()
g2.drawPoints(p2)
d2 = p2.getDigest()

print d1, "\n"
print d2

if d1 != d2:
    print "\nNot same glyph!"

I’ll send Georg sample files.

This was a tricky one. You call AllFonts() with two open fonts. What you get are six font, each font has three masters, and AllFonts() returns a RFont object of each of them.

save in this case is

f1 = RFont(Glyphs.fonts[0])
f2 = RFont(Glyphs.fonts[1])
1 Like