[sdf] Implement deviation-based splitting for Bezier curves

System Internals / FreeType - Anuj Verma [womp.xyz] - 5 March 2022 15:53 UTC

- src/sdf/ftsdf.c (split_sdf_cubic, split_sdf_shape): Add checks to figure out the deviation of Bezier curves and stop splitting if the curve is flat enough.

- src/sdf/ftsdfcommon.h (ONE_PIXEL): New macro.

2600ef637 [sdf] Implement deviation-based splitting for Bezier curves.
src/sdf/ftsdf.c | 52 ++++++++++++++++++++++++++++++++++++++++++---------
src/sdf/ftsdfcommon.h | 2 ++
2 files changed, 45 insertions(+), 9 deletions(-)

Upstream: git.savannah.gnu.org


  • Share