fonttools/Scripts/RoboFabUtils/GenerateKernProof.py
Erik van Blokland 617945dcf1 The scripts folder for FontLab as they shipped with Fab 1.1.1.
git-svn-id: http://svn.robofab.com/trunk@22 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2008-01-16 08:14:00 +00:00

32 lines
690 B
Python

#FLM: Make Kerning Proof of selection
"""Generate an InDesign 2.0 tagged text file
for every possible glyph combination in the current font."""
from robofab.tools.proof import IDTaggedText
from robofab.world import CurrentFont
f = CurrentFont()
fontSize = 36
id = IDTaggedText(f.info.familyName, f.info.styleName, size=fontSize)
names = f.selection
names.sort()
for l in names:
left = f[l]
for r in names:
right = f[r]
id.addGlyph(left.index)
id.addGlyph(right.index)
id.add(' ')
print 'finished all pairs starting with', left.name
from robofab.interface.all.dialogs import PutFile
path = PutFile("Save the tagged file:", "KerningProofTags.txt")
if path:
id.save(path)