Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ufoOperator #40

Merged
merged 26 commits into from
Jan 6, 2023
Merged

ufoOperator #40

merged 26 commits into from
Jan 6, 2023

Conversation

LettError
Copy link
Owner

A replacement for ufoProcessor, built as a new thing so that it won't break anything. Generates UFO and provides interpolations for info, kerning, glyphs, in mutatormath and varlib, in anisotropic and extrapolation.

* generator for test ds5 designspace
* some exploring in sorting axes, discrete locations and masters
handle serialized for discrete axis object
follow the process into getGlyphMutator and see what happens.
this prepares the glyph data for consumption by mutatormath and varlib.
Working variationmodels and mutators!
Add another test glyph
Add kerning pairs
Kerning mutator + Varlib,
generates kerning
generates info
Needs serious clean up.
Lots of work on designspaceObject work with discrete axes. Cleaning up.
Tests need to be run from this __init__.
Lots of printing as well, sorry.
Script that makes test designspace: 1 interpolating + 2 discrete axes.
Hand tuned masters.
Some notes in the readme about the space and the tests
Found an unexpected extrapolation feature in varlib. Back to mutatorMath.
mutatormath outline generation works
mutatormath anisotropic works
removed lots of prints
starting adding memoize but doesn't seem to work
* stricter immutable kwargs for better keying
* make the anisotropic test value  not an interpolation
* also immutify the args.
* Frederik's immutify
* reorganise
* include font.info. features and groups
* generate mutmath as well as varlib instances in separate directories
* clean up
* add axis mapping to test document, compare results mm and vl
* make useVarLib a property that then also clears the memocache
* idea for updating the loaded fonts: first we open with all the files on disk. Then we update with fontobjects that happen to be open. Clear the cache.
* dsp.glyphChanged(<glyphName>) checks for the right value in key.
Rename folders, move things, cleanup
Remove sp3 reader + test files
Remove some old issue folders from tests
Remove tests that don't work with fontparts.
Restructure findDefault to work with discreteLocation.
Support stuff for Batch
This refactors UFOprocessor from subclassing from to wrapping a fonttools designspace object in the hopes to have some buffer between the projects.

In this state ufoProcessor supports discrete axes: it will collect the right sources for the continuous bits and make glyphs, font info and kerning.

Todo: all the testing. Also the live-reloading thing is not part of this.
So, if a source ufo has a variation on a space glyph or some other whitespace, like "space.tight", this will fail the checkGlyphIsEmpty test because it has no reognised whitespace unicode. This fix bluntly looks for "space" in the glyphname. While I'm aware this is not a comprehensive approach, it is low risk.
+ add updateFonts(), changed(), glyphChanged()

updateFonts takes a list of fontobjects and it will drop them in the doc.fonts if the fonts have the same path and call changed(). This does not need to check layernames.
+ Rename emptyPen to the more generic pens so that the decomposepen can also move there.
+ Remove self.problems, do all reporting to the logger.
+ makeOneGlyph() a one stop method for fulfilling all orders for a specific glyph. Accept every location, math model, rounding and decompose.
+ inspectMemoizeCache() Convenience method for dumping the memoize cache keys to get an impression of what happened.
+ collectBaseGlyphs() does some work towards finding out which glyphs are needed to build all components. But it would overload makeOneGlyph so it has to be its own thing.
+ because that would be a new name for the thing because it may not be backwards compatible anymore
+ collectForegroundLayerNames to make a slightly more robust last of foreground layer names. It's a bit more complicated because it may be defcon fonts as well as fontparts wrapped things, inside and outside of RF
+ some tweaks, comments
I like this name better.
@LettError LettError merged commit 5742cff into master Jan 6, 2023
@LettError LettError deleted the ds5 branch October 15, 2023 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant