Better cubic to quadratic #235
Labels
needs discussion
This change requires some more discussion before we decide we definitely want it
performance
This issue suggests an improvement to either the time performance or accuracy of an algorithm
https://docs.rs/kurbo/latest/kurbo/fn.cubics_to_quadratic_splines.html, added in #193 as a port of https://github.com/fonttools/fonttools/tree/main/Lib/fontTools/cu2qu, allows us to convert a set of cubics to an interpolation compatible quadratic b-spline. This is invaluable in font compilation of variable fonts that use cubic sources as the https://learn.microsoft.com/en-us/typography/opentype/spec/glyf table currently only supports quadratics.
Per discussion with @raphlinus, we could improve on the current algorithm:
The improved version would be expected to outdo cu2qu for S curves and cases where there's an extremely highly curved region, e.g. the notch under a ball at the end of a font shape.
A better cu2qu would be of immediate value to https://github.com/googlefonts/fontmake-rs.
The text was updated successfully, but these errors were encountered: