Skip to main content

PyPI

ufoProcessor

Python package based on the designSpaceDocument from fontTools.designspaceLib) specifically to process and generate instances for UFO files, glyphs and other data.

UFOOperator takes over from UfoProcessor

Some deep changes were necessary to support designspace format 5 files. Rather than try to work it into unwilling old code, UFOOperator is rewritten from the bottom up. The new object wraps the FontTools DesignSpaceDocument object, rather than subclassing it. The goals for UFOOperator remain largely the same. Though the emphasis is now on providing objects that provide live interpolation, rather than generate stand alone UFOs.

  • Support designspace format 5, with layers. Not all elements of designspace 5 are supported.
  • Collect source materials
  • Provide mutators for specific glyphs, font info, kerning so that other tools can generate partial instances. Either from MutatorMath or fonttools varlib.model.
  • Support anisotropic locations in both math models, even if Variable Fonts won't. These are super useful during design, so I need them to work.
  • Support extrapolation in both math models, even if Variable Fonts won't. Note that MutatorMath and VarLib approach extrapolation differently. Useful for design-explorations.
  • Support discrete axes. This is a bit complex, but it is nice when it works.
  • Apply avar-like designspace bending
  • Generate actual UFO instances in formats 3.
  • Round geometry as requested
  • Try to stay up to date with fontTools
  • Baseclass for tools that need access to designspace data.
  • Some caching of MutatorMath and Varlib flavored mutators.

No more rules

UFOProcessor could execute some of the feature-variation rules when it generated UFOs. But these variations has become much more complex than can be faked with simple glyph-swapping. So I did not port that to UFOOperator. UFOs generated with UFOOperator will have all the glyphs in the same places as their sources.

Discrete axes

A discrete axis is a way to fit different interpolating systems into a single designspace. For instance a roman could be on italic=0 and the italic on italic=1. The roman and italic are in the same file, but to UFOOperator they are separate systems that interpolate along the normal axes. If is are more than one discrete axis in a designspace, each combination of the axis values, each discrete location can be an interpolating system. So some of the methods of UFOOperator require a discrete location to know which interpolating system is needed.

Methods for muting, skipping and excluding

That does not sound very friendly, but these are different ways of preventing glyphs from going somewhere. Hidden in the code, it is useful to have this here.
  • skipExportGlyphLibKey = 'public.skipExportGlyphs' Public key for list of glyph names need to be skipped on generate. "Export" is understood to mean "when generating binaries". Stored in the font.lib, saved with the generated UFO, UFOOperator copies the key + value to the instances, but does not do anything with the names.

  • excludeGlyphFromInstanceLibKey = 'com.letterror.ufoProcessor.excludeFromInstance' This is a private key for list of glyph names we want to exclude when calculating instances. "Exclude" is understood to mean "do not attempt to instantiate". It is a mechanism to make instances while some of the glyph data is not ready. Note: this mechanism does not let us exclude specific glyphs in specific layers. UFOOperator.lib, saved with the designspace.

  • Muted glyphnames are stored for each source descriptor separately in the designspace. This prevents a specific glyph from a specific source from being used in the calculation. So for instance, you can mute the "A" from the Bold, but keep the "A" from the Regular and the Extra Bold.

  • mutedDesignLocationsLibKey = 'mutedDesignLocations' UFOOperator key for temporarily muting entire specific design locations. Any source at this location will be ignored when building a new mutator. Usecase: when making partial sources, we need to be able to calculate a preview of the glyph without that specific glyph. UFOOperator.tempLib, not saved with the designspace.

Examples UFOProcessor (old)

Generate all the instances (using the varlib model, no rounding):

import ufoProcessor
myPath = "myDesignspace.designspace"
ufoProcessor.build(myPath)

Generate all the instances (using the varlib model, but round all the geometry to integers):

import ufoProcessor
myPath = "myDesignspace.designspace"
ufoProcessor.build(myPath, roundGeometry=True)

Generate all the instances (using the mutatormath model, no rounding):

import ufoProcessor
myPath = "myDesignspace.designspace"
ufoProcessor.build(myPath, useVarlib=False)

Generate an instance for one glyph, "A" at width=100, weight=200. (assuming the designspace has those axes and the masters have that glyph)

import ufoProcessor
myPath = "myDesignspace.designspace"
doc = ufoProcessor.DesignSpaceProcessor()
doc.read(myPath)
doc.loadFonts()
glyphMutator = doc.getGlyphMutator("A")
instance = glyphMutator.makeInstance(Location(width=100, weight=200)

Depending on the setting for usevarlib, the glyphMutator object returned by getGlyphMutator in the example above can either be a MutatorMath.Mutator, or a VariationModelMutator object. That uses the fontTools.varLib.models.VariationModel but it is wrapped and can be called as a Mutator object to generate instances. This way DesignSpaceProcessor does not need to know much about which math model it is using.

Metadata

Release files for ufoProcessor 1.14.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ufoProcessor 1.14.2
File Size Uploaded Provenance Actions
ufoprocessor-1.14.2.tar.gz 131.4 kB With provenance Details for ufoprocessor-1.14.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ufoProcessor 1.14.2
File Interpreter ABI Platform Actions
ufoprocessor-1.14.2-py2.py3-none-any.whl Python 3, Python 2 none any Details for ufoprocessor-1.14.2-py2.py3-none-any.whl

Total release size: 170.5 kB

Release files / ufoprocessor-1.14.2.tar.gz

Download URL ufoprocessor-1.14.2.tar.gz
Size 131.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b0c4f42b0903b0771e499064895d066121a482ac060f46b78dc00c5f2c3228e5
BLAKE2b-256 checksum
How to use checksums
24adf6bcbe9bb63c0f8e99a4d57cced30d42c0c07054f2e31430da0278daff3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / ufoprocessor-1.14.2-py2.py3-none-any.whl

Download URL ufoprocessor-1.14.2-py2.py3-none-any.whl
Size 39.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
4d9ed86ad785759e622e4f46dcda694120afcf4342c758d0cccf05ac9a5d8bb6
BLAKE2b-256 checksum
How to use checksums
c1f2e899b7093940439c6819abcb600c9223b97a9d8cf49189dee174797b1d0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Security for ufoProcessor 1.14.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ufoprocessor-1.14.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page