This issue is part of a problem that spans fontMath.MathGlyph / fontParts.RGlyph / UFOProcessor. It should be possible to get data in and out of MathGlyph without the filterRedundantPoints filter. MathGlyph already has support for this.
History: by default MathGlyph adds on-point bcps to all straight segments on init, and filters the on-point bcps out on extraction. This was to reduce compatibility issues. Currently a lot of the work is done towards variable fonts and these are a lot stricter and the adding / filtering of bcps is just too invasive. The filtering even takes out points that were intended to be part of the outlines (see this UFOProcessor issue.)
MathGlyph has a flag to switch this filtering off. But I need to make sure it doesn't also add them at initialisation. We abstracted the way fontParts.RGlyph makes and gets MathGlyphs. So fontParts and its users can not get to those flags directly. And maintaining forked versions of mathGlyph / fontParts and ufoProcessor is a hassle.
Proposal: I would like to add a filterRedundantPoints or suitably renamed flag to toMathGlyph and fromMathGlyph. Default set to current behaviour, True. In an old (and stale) sketch I named this flag strict. Then I can add a similar flag to ufoProcessor and all its users too.
This issue is part of a problem that spans fontMath.MathGlyph / fontParts.RGlyph / UFOProcessor. It should be possible to get data in and out of MathGlyph without the
filterRedundantPointsfilter. MathGlyph already has support for this.History: by default MathGlyph adds on-point bcps to all straight segments on init, and filters the on-point bcps out on extraction. This was to reduce compatibility issues. Currently a lot of the work is done towards variable fonts and these are a lot stricter and the adding / filtering of bcps is just too invasive. The filtering even takes out points that were intended to be part of the outlines (see this UFOProcessor issue.)
MathGlyph has a flag to switch this filtering off. But I need to make sure it doesn't also add them at initialisation. We abstracted the way fontParts.RGlyph makes and gets MathGlyphs. So fontParts and its users can not get to those flags directly. And maintaining forked versions of mathGlyph / fontParts and ufoProcessor is a hassle.
Proposal: I would like to add a
filterRedundantPointsor suitably renamed flag totoMathGlyphandfromMathGlyph. Default set to current behaviour,True. In an old (and stale) sketch I named this flagstrict. Then I can add a similar flag to ufoProcessor and all its users too.