1########################################## 2cu2qu: Cubic to quadratic curve conversion 3########################################## 4 5Routines for converting cubic curves to quadratic splines, suitable for use 6in OpenType to TrueType outline conversion. 7 8Conversion is carried out to a degree of tolerance provided by the user. While 9it is relatively easy to find the best *single* quadratic curve to represent a 10given cubic (see for example `this method from CAGD <https://www.sirver.net/blog/2011/08/23/degree-reduction-of-bezier-curves/>`_), 11the best-fit method may not be sufficiently accurate for type design. 12 13Instead, this method chops the cubic curve into multiple segments before 14converting each cubic segment to a quadratic, in order to ensure that the 15resulting spline fits within the given tolerance. 16 17The basic curve conversion routines are implemented in the 18:mod:`fontTools.cu2qu.cu2qu` module; the :mod:`fontTools.cu2qu.ufo` module 19applies these routines to all of the curves in a UFO file or files; while the 20:mod:`fontTools.cu2qu.cli` module implements the ``fonttools cu2qu`` command 21for converting a UFO format font with cubic curves into one with quadratic 22curves. 23 24fontTools.cu2qu.cu2qu 25--------------------- 26 27.. automodule:: fontTools.cu2qu.cu2qu 28 :inherited-members: 29 :members: 30 :undoc-members: 31 32fontTools.cu2qu.ufo 33------------------- 34 35.. automodule:: fontTools.cu2qu.ufo 36 :inherited-members: 37 :members: 38 :undoc-members: 39