Skip to content

fontlab_fontport.designspace_io

designspace_io

Export a multi-master font as a .designspace plus one UFO per master.

MVP, built on the whole-font UFO export: each native master is a layer of the exported UFO (see interchange.ExportSession), so this splits those layers into one UFO per master and writes axes, sources and instances with fontTools. Kerning is read per master (flPackage.kerning(master)) and written to each master UFO. Info, groups, lib and features are shared by every master UFO because the native adapter reads only the key master's. losses names what is not carried (rules, labels, per-master groups, brace layers). Importing a .designspace into FontLab is not provided: native master creation is unavailable (see docs/UFO-INTERCHANGE.md).

Complete member index

Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.

Member Kind Signature Summary
LOSSES attribute
export_designspace function (backend, destination: str | Path, document: DesignSpaceDocument | None=None) -> tuple[Path, list[str]] Export a backend's masters to <code>destination</code>; return the path and losses.
write_designspace function (font: Font, document: DesignSpaceDocument, destination: str | Path, master_kerning: dict | None=None) -> Path Write <code>destination</code><code> (.designspace) and </code><code>&lt;stem&gt;-&lt;master&gt;.ufo</code> beside it.