For work on variable fonts, or really any multiple master project, it would be handy to have a remove overlap function that works on all layers, but keeps them compatible if possible.
I tried to write a script that simply tries to remove overlaps on a copy of the glyphs, and keeps the changes only if the glyphs are still compatible. But this doesn’t seem to work, the temporary glyph is always reported as compatible after remove overlap, even if it really isn’t.
You can find the script on my GitHub repo.
Any ideas?