API

Function cubicToQuadratics

  • Approximate a cubic Bézier with two quadratics using the "3/4 rule" (matches Slug reference). Exposed as a public helper so callers that ingest cubic outlines from their own font sources (e.g. DirectWrite, FreeType) can convert into the quadratic-only format GlyphCurves expects.

    Parameters

    • p0x: number
    • p0y: number
    • c1x: number
    • c1y: number
    • c2x: number
    • c2y: number
    • p1x: number
    • p1y: number

    Returns [QuadCurve, QuadCurve]