I've done some work in the past few weeks to land high quality Bézier path simplification in kurbo and make it more robust. It's not completely done yet (explicit corner handling is a todo), but it does a pretty good job with one of our test cases. Here it has fit the source curve (blue) with 41 Bézier segments. I believe it is close to the optimum possible solution for the error tolerance. New PR: https://github.com/linebender/kurbo/pull/269
This will be useful both for fonts and design tools for vector graphics.
@raph I'm just the peanut gallery here but I have to ask... what's going on at these two points, on the lower edge? normally I'd expect the simplification to be smoother, but these seem to be surprisingly sharp turns on a smooth section of the input curve? I had to double check, are the source and output curves swapped? (just asking because they jumped out, incredibly impressed with this work)