2008-01-16 08:14:00 +00:00
|
|
|
#
|
|
|
|
#
|
|
|
|
# make a list of which glyphs in this font could theoretically
|
|
|
|
# interpolate with each other.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
from robofab.world import CurrentFont
|
|
|
|
from robofab.pens.digestPen import DigestPointPen, DigestPointStructurePen
|
|
|
|
|
|
|
|
compatibles = {}
|
|
|
|
|
|
|
|
f = CurrentFont()
|
|
|
|
for c in f:
|
|
|
|
p = DigestPointStructurePen()
|
|
|
|
c.drawPoints(p)
|
|
|
|
d = p.getDigest()
|
|
|
|
if not compatibles.has_key(d):
|
|
|
|
compatibles[d] = []
|
|
|
|
compatibles[d].append(c.name)
|
|
|
|
|
|
|
|
print
|
2009-02-28 15:47:24 +00:00
|
|
|
print 'In %s, these glyphs could interpolate:'%(f.info.postscriptFullName)
|
2008-01-16 08:14:00 +00:00
|
|
|
for d, names in compatibles.items():
|
|
|
|
if len(names) > 1:
|
|
|
|
print ", ".join(names)
|