User Guide

Macro Programming
705
The first line will print the number of glyphs in the font. The second line is
a shorter version of the example described above.
With the glyphs member you may perform several operations, like adding a
new glyph:
g = Glyph()
fl.font.glyphs.append(g)
This example will append a new glyph to the font.
To remove all the glyphs in the font use this method:
fl.font.glyphs.clean()
Other members of the Font class represent Font Header data and you can
get a list of them using the following operation:
print Font().__doc__
Two methods of the Font class relate to FontLab internal format:
Open(filename)
opens font from VFB format
Save(filename)
saves font in VFB format
These operations are not connected to the FontLab UI, so you may use
them with fonts created inside a Python program and not connected to the
FontLab system.