Open madig opened 1 year ago
definitely not intended behaviour. is this only happening with DottedCircleFilter or with any other filter?
As Cosimo found: https://github.com/googlefonts/ufo2ft/blob/5a5f6dfdebeaaaa50de0b927f122776f3783e1d9/Lib/ufo2ft/util.py#L61
This shallow copy is fine if you mod existing glyphs, but here we add a glyph, landing it in nirvana. @anthrotype says we should maybe change all instances of glyphSet = _GlyphSet.from_layer(font)
to glyphSet = font.layers.defaultLayer
in filters. The problem doesn't typically come up because ufo2ft's preprocessor code makes and uses its own glyphsets and passes them in explicitly, whereas here we implicitly want the current UFO to be modified.
The filter seems to not draw a dottedCircle into a UFO, unless you pass in the glyphset/layer expliticly:
Fails on the assert. It passes if you call
philter(ufo, ufo.layers.defaultLayer)
.Is this intended behavior?