defcon provides a set of flexibly object-oriented Python classes for representing and manipulating UFO font data. It is used in font tooling like fontmake and is the recommended Python layer for UFO font development. Current version 0.12.2, with active development on GitHub.
pip install defconNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Opens a UFO file, reads font info, and adds a new glyph.
Upgrade to Python 3.9+ and ensure your UFO files conform to UFO 3.
Always call font.save() after making changes if persistence is desired.
Use font.insertGlyph(glyph) or append to font.glyphs list to properly register the glyph.
Use from defcon.objects.glyph import Glyph or from defcon import Glyph (if available). In recent versions, import from defcon.objects.
Ensure the UFO path exists and is a valid .ufo directory. Check that the font was loaded successfully.
Use a UFO 3 compliant source. If upgrading from UFO 2, convert via ufoLib or ufo2ft.
No dependency data recorded yet.