fonttools/Scripts/RoboFabIntro/demo_PrintKerningCounts.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

12 lines
339 B
Python

#FLM: Kerning Counter
"""print kerning counts for glyphs selected in the font window"""
from robofab.world import CurrentFont
font = CurrentFont()
selectedGlyphs = font.selection
kerning = font.kerning
counts = kerning.occurrenceCount(selectedGlyphs)
for glyphName in selectedGlyphs:
print "%s: %s pairs"%(glyphName, counts[glyphName])