Erik van Blokland 3646055ea2 initial import
git-svn-id: http://svn.robofab.com/trunk@1 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2008-01-07 17:40:34 +00:00

18 lines
446 B
Python

# robofab manual
# Font object
# attribute examples
# Most useful attributes of RFont are
# actually stored in <a href="objects/info.html">RFont.info</a>
f = CurrentFont()
print f.info.unitsPerEm
# kerning data is available in the kerning object:
print f.kerning
# len() gives you the "length" of the font, i.e. the number of glyphs
print "glyphs in this font:", len(f)
# treat a font object as a dictionary to get to the glyphs
print f["A"]