fonttools 4.59.1__cp310-cp310-win_amd64.whl → 4.60.0__cp310-cp310-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of fonttools might be problematic. Click here for more details.

Files changed (51) hide show
  1. fontTools/__init__.py +1 -1
  2. fontTools/annotations.py +30 -0
  3. fontTools/cu2qu/cu2qu.c +1185 -971
  4. fontTools/cu2qu/cu2qu.cp310-win_amd64.pyd +0 -0
  5. fontTools/cu2qu/cu2qu.py +36 -4
  6. fontTools/feaLib/builder.py +9 -3
  7. fontTools/feaLib/lexer.c +18 -12
  8. fontTools/feaLib/lexer.cp310-win_amd64.pyd +0 -0
  9. fontTools/feaLib/parser.py +11 -1
  10. fontTools/feaLib/variableScalar.py +6 -1
  11. fontTools/misc/bezierTools.c +18 -12
  12. fontTools/misc/bezierTools.cp310-win_amd64.pyd +0 -0
  13. fontTools/misc/enumTools.py +23 -0
  14. fontTools/misc/textTools.py +4 -2
  15. fontTools/pens/filterPen.py +218 -26
  16. fontTools/pens/momentsPen.c +18 -12
  17. fontTools/pens/momentsPen.cp310-win_amd64.pyd +0 -0
  18. fontTools/pens/pointPen.py +40 -6
  19. fontTools/qu2cu/qu2cu.c +30 -16
  20. fontTools/qu2cu/qu2cu.cp310-win_amd64.pyd +0 -0
  21. fontTools/subset/__init__.py +1 -0
  22. fontTools/ttLib/tables/_a_v_a_r.py +4 -2
  23. fontTools/ttLib/tables/_n_a_m_e.py +11 -6
  24. fontTools/ttLib/tables/_p_o_s_t.py +5 -5
  25. fontTools/ufoLib/__init__.py +279 -176
  26. fontTools/ufoLib/converters.py +14 -5
  27. fontTools/ufoLib/filenames.py +16 -6
  28. fontTools/ufoLib/glifLib.py +286 -190
  29. fontTools/ufoLib/kerning.py +32 -12
  30. fontTools/ufoLib/utils.py +41 -13
  31. fontTools/ufoLib/validators.py +121 -97
  32. fontTools/varLib/__init__.py +80 -1
  33. fontTools/varLib/avar/__init__.py +0 -0
  34. fontTools/varLib/avar/__main__.py +72 -0
  35. fontTools/varLib/avar/build.py +79 -0
  36. fontTools/varLib/avar/map.py +108 -0
  37. fontTools/varLib/avar/plan.py +1004 -0
  38. fontTools/varLib/{avar.py → avar/unbuild.py} +70 -59
  39. fontTools/varLib/avarPlanner.py +3 -999
  40. fontTools/varLib/instancer/__init__.py +56 -18
  41. fontTools/varLib/interpolatableHelpers.py +3 -0
  42. fontTools/varLib/iup.c +24 -14
  43. fontTools/varLib/iup.cp310-win_amd64.pyd +0 -0
  44. {fonttools-4.59.1.dist-info → fonttools-4.60.0.dist-info}/METADATA +43 -2
  45. {fonttools-4.59.1.dist-info → fonttools-4.60.0.dist-info}/RECORD +51 -44
  46. {fonttools-4.59.1.data → fonttools-4.60.0.data}/data/share/man/man1/ttx.1 +0 -0
  47. {fonttools-4.59.1.dist-info → fonttools-4.60.0.dist-info}/WHEEL +0 -0
  48. {fonttools-4.59.1.dist-info → fonttools-4.60.0.dist-info}/entry_points.txt +0 -0
  49. {fonttools-4.59.1.dist-info → fonttools-4.60.0.dist-info}/licenses/LICENSE +0 -0
  50. {fonttools-4.59.1.dist-info → fonttools-4.60.0.dist-info}/licenses/LICENSE.external +0 -0
  51. {fonttools-4.59.1.dist-info → fonttools-4.60.0.dist-info}/top_level.txt +0 -0
fontTools/cu2qu/cu2qu.c CHANGED
@@ -1,4 +1,4 @@
1
- /* Generated by Cython 3.1.3 */
1
+ /* Generated by Cython 3.1.4 */
2
2
 
3
3
  /* BEGIN: Cython Metadata
4
4
  {
@@ -32,8 +32,8 @@ END: Cython Metadata */
32
32
  #elif PY_VERSION_HEX < 0x03080000
33
33
  #error Cython requires Python 3.8+.
34
34
  #else
35
- #define __PYX_ABI_VERSION "3_1_3"
36
- #define CYTHON_HEX_VERSION 0x030103F0
35
+ #define __PYX_ABI_VERSION "3_1_4"
36
+ #define CYTHON_HEX_VERSION 0x030104F0
37
37
  #define CYTHON_FUTURE_DIVISION 1
38
38
  /* CModulePreamble */
39
39
  #include <stddef.h>
@@ -1546,7 +1546,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(do
1546
1546
  /*--- Type declarations ---*/
1547
1547
  struct __pyx_obj_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen;
1548
1548
 
1549
- /* "fontTools/cu2qu/cu2qu.py":124
1549
+ /* "fontTools/cu2qu/cu2qu.py":150
1550
1550
  *
1551
1551
  *
1552
1552
  * @cython.locals( # <<<<<<<<<<<<<<
@@ -1719,6 +1719,54 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, P
1719
1719
  /* GetBuiltinName.proto */
1720
1720
  static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1721
1721
 
1722
+ /* IncludeStdlibH.proto */
1723
+ #include <stdlib.h>
1724
+
1725
+ /* PyFunctionFastCall.proto */
1726
+ #if CYTHON_FAST_PYCALL
1727
+ #if !CYTHON_VECTORCALL
1728
+ #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1729
+ __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1730
+ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs);
1731
+ #endif
1732
+ #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1733
+ (sizeof(char [1 - 2*!(cond)]) - 1)
1734
+ #ifndef Py_MEMBER_SIZE
1735
+ #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1736
+ #endif
1737
+ #if !CYTHON_VECTORCALL
1738
+ #if PY_VERSION_HEX >= 0x03080000
1739
+ #include "frameobject.h"
1740
+ #define __Pxy_PyFrame_Initialize_Offsets()
1741
+ #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus)
1742
+ #else
1743
+ static size_t __pyx_pyframe_localsplus_offset = 0;
1744
+ #include "frameobject.h"
1745
+ #define __Pxy_PyFrame_Initialize_Offsets()\
1746
+ ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1747
+ (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1748
+ #define __Pyx_PyFrame_GetLocalsplus(frame)\
1749
+ (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1750
+ #endif
1751
+ #endif
1752
+ #endif
1753
+
1754
+ /* PyObjectCall.proto */
1755
+ #if CYTHON_COMPILING_IN_CPYTHON
1756
+ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1757
+ #else
1758
+ #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1759
+ #endif
1760
+
1761
+ /* PyObjectCallMethO.proto */
1762
+ #if CYTHON_COMPILING_IN_CPYTHON
1763
+ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1764
+ #endif
1765
+
1766
+ /* PyObjectFastCall.proto */
1767
+ #define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
1768
+ static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs);
1769
+
1722
1770
  /* PyLongCompare.proto */
1723
1771
  static CYTHON_INLINE int __Pyx_PyLong_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);
1724
1772
 
@@ -1803,51 +1851,6 @@ static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_ve
1803
1851
  static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1804
1852
  #endif
1805
1853
 
1806
- /* PyFunctionFastCall.proto */
1807
- #if CYTHON_FAST_PYCALL
1808
- #if !CYTHON_VECTORCALL
1809
- #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1810
- __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1811
- static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs);
1812
- #endif
1813
- #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1814
- (sizeof(char [1 - 2*!(cond)]) - 1)
1815
- #ifndef Py_MEMBER_SIZE
1816
- #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1817
- #endif
1818
- #if !CYTHON_VECTORCALL
1819
- #if PY_VERSION_HEX >= 0x03080000
1820
- #include "frameobject.h"
1821
- #define __Pxy_PyFrame_Initialize_Offsets()
1822
- #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus)
1823
- #else
1824
- static size_t __pyx_pyframe_localsplus_offset = 0;
1825
- #include "frameobject.h"
1826
- #define __Pxy_PyFrame_Initialize_Offsets()\
1827
- ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1828
- (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1829
- #define __Pyx_PyFrame_GetLocalsplus(frame)\
1830
- (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1831
- #endif
1832
- #endif
1833
- #endif
1834
-
1835
- /* PyObjectCall.proto */
1836
- #if CYTHON_COMPILING_IN_CPYTHON
1837
- static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1838
- #else
1839
- #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1840
- #endif
1841
-
1842
- /* PyObjectCallMethO.proto */
1843
- #if CYTHON_COMPILING_IN_CPYTHON
1844
- static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1845
- #endif
1846
-
1847
- /* PyObjectFastCall.proto */
1848
- #define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
1849
- static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs);
1850
-
1851
1854
  /* TupleAndListFromArray.proto */
1852
1855
  #if CYTHON_COMPILING_IN_CPYTHON
1853
1856
  static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
@@ -2765,6 +2768,7 @@ static int __Pyx_State_RemoveModule(void*);
2765
2768
 
2766
2769
  /* Module declarations from "fontTools.cu2qu.cu2qu" */
2767
2770
  static CYTHON_INLINE double __pyx_f_9fontTools_5cu2qu_5cu2qu_dot(__pyx_t_double_complex, __pyx_t_double_complex); /*proto*/
2771
+ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu__complex_div_by_real(__pyx_t_double_complex, double); /*proto*/
2768
2772
  static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_points(__pyx_t_double_complex, __pyx_t_double_complex, __pyx_t_double_complex, __pyx_t_double_complex); /*proto*/
2769
2773
  static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_parameters(__pyx_t_double_complex, __pyx_t_double_complex, __pyx_t_double_complex, __pyx_t_double_complex); /*proto*/
2770
2774
  static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_n_iter(__pyx_t_double_complex, __pyx_t_double_complex, __pyx_t_double_complex, __pyx_t_double_complex, PyObject *); /*proto*/
@@ -2867,7 +2871,7 @@ static const char __pyx_k_curves_to_quadratic[] = "curves_to_quadratic";
2867
2871
  static const char __pyx_k_fontTools_cu2qu_cu2qu[] = "fontTools.cu2qu.cu2qu";
2868
2872
  static const char __pyx_k_split_cubic_into_n_gen[] = "_split_cubic_into_n_gen";
2869
2873
  static const char __pyx_k_Lib_fontTools_cu2qu_cu2qu_py[] = "Lib/fontTools/cu2qu/cu2qu.py";
2870
- static const char __pyx_k_curves_to_quadratic_line_471[] = "curves_to_quadratic (line 471)";
2874
+ static const char __pyx_k_curves_to_quadratic_line_503[] = "curves_to_quadratic (line 503)";
2871
2875
  static const char __pyx_k_AWBc_U_U_3fBa_AWCy_7_2QgQgT_a_Q[] = "\200\001\360\006\000()\360*\000\005\r\210A\210W\220B\220c\230\024\230U\240!\340\004\010\210\005\210U\220!\2203\220f\230B\230a\330\010\021\320\021$\240A\240W\250C\250y\270\001\330\010\013\2107\220'\230\021\340\014\023\2202\220Q\220g\230Q\230g\240T\250\025\250a\340\004\n\320\n\035\230Q\230a";
2872
2876
  static const char __pyx_k_J_Qawb_4uG4y_3a_3c_1A_avRq_T_AV[] = "\200\001\340,-\360J\001\000\005\016\210Q\210a\210w\220b\230\003\2304\230u\240G\2504\250y\270\001\330\004\013\2103\210a\210|\2303\230c\240\021\240!\340\004\010\210\003\2101\210A\330\004\016\210a\210v\220R\220q\330\004\r\210T\220\021\330\004\010\210\001\330\004\005\330\010\021\320\021$\240A\240V\2501\250D\260\003\260:\270Q\270d\300!\330\010\013\2107\220#\220Q\330\014\017\210r\220\023\220A\330\020\021\330\014\021\220\021\330\014\025\220Q\330\014\r\330\010\017\210q\220\005\220Q\330\010\r\210R\210r\220\023\220B\220a\330\010\013\2102\210S\220\001\340\014\023\2201\220B\220a\220w\230a\230w\240d\250%\250x\260t\270:\300Q\340\004\n\320\n\035\230Q\230a";
2873
2877
  static const char __pyx_k_Return_quadratic_Bezier_splines[] = "Return quadratic Bezier splines approximating the input cubic Beziers.\n\n Args:\n curves: A sequence of *n* curves, each curve being a sequence of four\n 2D tuples.\n max_errors: A sequence of *n* floats representing the maximum permissible\n deviation from each of the cubic Bezier curves.\n all_quadratic (bool): If True (default) returned values are a\n quadratic spline. If False, they are either a single quadratic\n curve or a single cubic curve.\n\n Example::\n\n >>> curves_to_quadratic( [\n ... [ (50,50), (100,100), (150,100), (200,50) ],\n ... [ (75,50), (120,100), (150,75), (200,60) ]\n ... ], [1,1] )\n [[(50.0, 50.0), (75.0, 75.0), (125.0, 91.66666666666666), (175.0, 75.0), (200.0, 50.0)], [(75.0, 50.0), (97.5, 75.0), (135.41666666666666, 82.08333333333333), (175.0, 67.5), (200.0, 60.0)]]\n\n The returned splines have \"implied oncurve points\" suitable for use in\n TrueType ``glif`` outlines - i.e. in the first spline returned above,\n the first quadratic segment runs from (50,50) to\n ( (75 + 125)/2 , (120 + 91.666..)/2 ) = (100, 83.333...).\n\n Returns:\n If all_quadratic is True, a list of splines, each spline being a list\n of 2D tuples.\n\n If all_quadratic is False, a list of curves, each curve being a quadratic\n (length 3), or cubic (length 4).\n\n Raises:\n fontTools.cu2qu.Errors.ApproxNotFoundError: if no suitable approximation\n can be found for all curves with the given parameters.\n ";
@@ -3002,7 +3006,7 @@ static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_stati
3002
3006
  #define __pyx_n_u_curve_to_quadratic __pyx_string_tab[27]
3003
3007
  #define __pyx_n_u_curves __pyx_string_tab[28]
3004
3008
  #define __pyx_n_u_curves_to_quadratic __pyx_string_tab[29]
3005
- #define __pyx_kp_u_curves_to_quadratic_line_471 __pyx_string_tab[30]
3009
+ #define __pyx_kp_u_curves_to_quadratic_line_503 __pyx_string_tab[30]
3006
3010
  #define __pyx_n_u_d __pyx_string_tab[31]
3007
3011
  #define __pyx_n_u_d1 __pyx_string_tab[32]
3008
3012
  #define __pyx_n_u_delta_2 __pyx_string_tab[33]
@@ -3125,16 +3129,58 @@ static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void
3125
3129
  */
3126
3130
 
3127
3131
  static CYTHON_INLINE double __pyx_f_9fontTools_5cu2qu_5cu2qu_dot(__pyx_t_double_complex __pyx_v_v1, __pyx_t_double_complex __pyx_v_v2) {
3132
+ double __pyx_v_result;
3128
3133
  double __pyx_r;
3134
+ double __pyx_t_1;
3135
+ int __pyx_t_2;
3129
3136
 
3130
3137
  /* "fontTools/cu2qu/cu2qu.py":51
3131
3138
  * double: Dot product.
3132
3139
  * """
3133
- * return (v1 * v2.conjugate()).real # <<<<<<<<<<<<<<
3140
+ * result = (v1 * v2.conjugate()).real # <<<<<<<<<<<<<<
3141
+ * # When vectors are perpendicular (i.e. dot product is 0), the above expression may
3142
+ * # yield slightly different results when running in pure Python vs C/Cython,
3143
+ */
3144
+ __pyx_t_1 = __Pyx_CREAL(__Pyx_c_prod_double(__pyx_v_v1, __Pyx_c_conj_double(__pyx_v_v2)));
3145
+ __pyx_v_result = __pyx_t_1;
3146
+
3147
+ /* "fontTools/cu2qu/cu2qu.py":58
3148
+ * # implementation. Because we are using the result in a denominator and catching
3149
+ * # ZeroDivisionError (see `calc_intersect`), it's best to normalize the result here.
3150
+ * if abs(result) < 1e-15: # <<<<<<<<<<<<<<
3151
+ * result = 0.0
3152
+ * return result
3153
+ */
3154
+ __pyx_t_1 = fabs(__pyx_v_result);
3155
+ __pyx_t_2 = (__pyx_t_1 < 1e-15);
3156
+ if (__pyx_t_2) {
3157
+
3158
+ /* "fontTools/cu2qu/cu2qu.py":59
3159
+ * # ZeroDivisionError (see `calc_intersect`), it's best to normalize the result here.
3160
+ * if abs(result) < 1e-15:
3161
+ * result = 0.0 # <<<<<<<<<<<<<<
3162
+ * return result
3163
+ *
3164
+ */
3165
+ __pyx_v_result = 0.0;
3166
+
3167
+ /* "fontTools/cu2qu/cu2qu.py":58
3168
+ * # implementation. Because we are using the result in a denominator and catching
3169
+ * # ZeroDivisionError (see `calc_intersect`), it's best to normalize the result here.
3170
+ * if abs(result) < 1e-15: # <<<<<<<<<<<<<<
3171
+ * result = 0.0
3172
+ * return result
3173
+ */
3174
+ }
3175
+
3176
+ /* "fontTools/cu2qu/cu2qu.py":60
3177
+ * if abs(result) < 1e-15:
3178
+ * result = 0.0
3179
+ * return result # <<<<<<<<<<<<<<
3134
3180
  *
3135
3181
  *
3136
3182
  */
3137
- __pyx_r = __Pyx_CREAL(__Pyx_c_prod_double(__pyx_v_v1, __Pyx_c_conj_double(__pyx_v_v2)));
3183
+ __pyx_r = __pyx_v_result;
3138
3184
  goto __pyx_L0;
3139
3185
 
3140
3186
  /* "fontTools/cu2qu/cu2qu.py":37
@@ -3150,7 +3196,113 @@ static CYTHON_INLINE double __pyx_f_9fontTools_5cu2qu_5cu2qu_dot(__pyx_t_double_
3150
3196
  return __pyx_r;
3151
3197
  }
3152
3198
 
3153
- /* "fontTools/cu2qu/cu2qu.py":54
3199
+ /* "fontTools/cu2qu/cu2qu.py":63
3200
+ *
3201
+ *
3202
+ * @cython.cfunc # <<<<<<<<<<<<<<
3203
+ * @cython.locals(z=cython.complex, den=cython.double)
3204
+ * @cython.locals(zr=cython.double, zi=cython.double)
3205
+ */
3206
+
3207
+ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu__complex_div_by_real(__pyx_t_double_complex __pyx_v_z, double __pyx_v_den) {
3208
+ double __pyx_v_zr;
3209
+ double __pyx_v_zi;
3210
+ PyObject *__pyx_r = NULL;
3211
+ __Pyx_RefNannyDeclarations
3212
+ double __pyx_t_1;
3213
+ PyObject *__pyx_t_2 = NULL;
3214
+ PyObject *__pyx_t_3 = NULL;
3215
+ PyObject *__pyx_t_4 = NULL;
3216
+ PyObject *__pyx_t_5 = NULL;
3217
+ PyObject *__pyx_t_6 = NULL;
3218
+ size_t __pyx_t_7;
3219
+ int __pyx_lineno = 0;
3220
+ const char *__pyx_filename = NULL;
3221
+ int __pyx_clineno = 0;
3222
+ __Pyx_RefNannySetupContext("_complex_div_by_real", 0);
3223
+
3224
+ /* "fontTools/cu2qu/cu2qu.py":75
3225
+ * https://github.com/fonttools/fonttools/issues/3928
3226
+ * """
3227
+ * zr = z.real # <<<<<<<<<<<<<<
3228
+ * zi = z.imag
3229
+ * return complex(zr / den, zi / den)
3230
+ */
3231
+ __pyx_t_1 = __Pyx_CREAL(__pyx_v_z);
3232
+ __pyx_v_zr = __pyx_t_1;
3233
+
3234
+ /* "fontTools/cu2qu/cu2qu.py":76
3235
+ * """
3236
+ * zr = z.real
3237
+ * zi = z.imag # <<<<<<<<<<<<<<
3238
+ * return complex(zr / den, zi / den)
3239
+ *
3240
+ */
3241
+ __pyx_t_1 = __Pyx_CIMAG(__pyx_v_z);
3242
+ __pyx_v_zi = __pyx_t_1;
3243
+
3244
+ /* "fontTools/cu2qu/cu2qu.py":77
3245
+ * zr = z.real
3246
+ * zi = z.imag
3247
+ * return complex(zr / den, zi / den) # <<<<<<<<<<<<<<
3248
+ *
3249
+ *
3250
+ */
3251
+ __Pyx_XDECREF(__pyx_r);
3252
+ __pyx_t_3 = NULL;
3253
+ __Pyx_INCREF((PyObject *)(&PyComplex_Type));
3254
+ __pyx_t_4 = ((PyObject *)(&PyComplex_Type));
3255
+ if (unlikely(__pyx_v_den == 0)) {
3256
+ PyErr_SetString(PyExc_ZeroDivisionError, "float division");
3257
+ __PYX_ERR(0, 77, __pyx_L1_error)
3258
+ }
3259
+ __pyx_t_5 = PyFloat_FromDouble((__pyx_v_zr / __pyx_v_den)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 77, __pyx_L1_error)
3260
+ __Pyx_GOTREF(__pyx_t_5);
3261
+ if (unlikely(__pyx_v_den == 0)) {
3262
+ PyErr_SetString(PyExc_ZeroDivisionError, "float division");
3263
+ __PYX_ERR(0, 77, __pyx_L1_error)
3264
+ }
3265
+ __pyx_t_6 = PyFloat_FromDouble((__pyx_v_zi / __pyx_v_den)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 77, __pyx_L1_error)
3266
+ __Pyx_GOTREF(__pyx_t_6);
3267
+ __pyx_t_7 = 1;
3268
+ {
3269
+ PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_5, __pyx_t_6};
3270
+ __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
3271
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
3272
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3273
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3274
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3275
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
3276
+ __Pyx_GOTREF(__pyx_t_2);
3277
+ }
3278
+ __pyx_r = __pyx_t_2;
3279
+ __pyx_t_2 = 0;
3280
+ goto __pyx_L0;
3281
+
3282
+ /* "fontTools/cu2qu/cu2qu.py":63
3283
+ *
3284
+ *
3285
+ * @cython.cfunc # <<<<<<<<<<<<<<
3286
+ * @cython.locals(z=cython.complex, den=cython.double)
3287
+ * @cython.locals(zr=cython.double, zi=cython.double)
3288
+ */
3289
+
3290
+ /* function exit code */
3291
+ __pyx_L1_error:;
3292
+ __Pyx_XDECREF(__pyx_t_2);
3293
+ __Pyx_XDECREF(__pyx_t_3);
3294
+ __Pyx_XDECREF(__pyx_t_4);
3295
+ __Pyx_XDECREF(__pyx_t_5);
3296
+ __Pyx_XDECREF(__pyx_t_6);
3297
+ __Pyx_AddTraceback("fontTools.cu2qu.cu2qu._complex_div_by_real", __pyx_clineno, __pyx_lineno, __pyx_filename);
3298
+ __pyx_r = 0;
3299
+ __pyx_L0:;
3300
+ __Pyx_XGIVEREF(__pyx_r);
3301
+ __Pyx_RefNannyFinishContext();
3302
+ return __pyx_r;
3303
+ }
3304
+
3305
+ /* "fontTools/cu2qu/cu2qu.py":80
3154
3306
  *
3155
3307
  *
3156
3308
  * @cython.cfunc # <<<<<<<<<<<<<<
@@ -3165,100 +3317,108 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_point
3165
3317
  __pyx_t_double_complex __pyx_v__4;
3166
3318
  PyObject *__pyx_r = NULL;
3167
3319
  __Pyx_RefNannyDeclarations
3168
- __pyx_t_double_complex __pyx_t_1;
3169
- __pyx_t_double_complex __pyx_t_2;
3320
+ PyObject *__pyx_t_1 = NULL;
3321
+ PyObject *__pyx_t_2 = NULL;
3170
3322
  PyObject *__pyx_t_3 = NULL;
3171
- PyObject *__pyx_t_4 = NULL;
3323
+ __pyx_t_double_complex __pyx_t_4;
3172
3324
  PyObject *__pyx_t_5 = NULL;
3173
3325
  PyObject *__pyx_t_6 = NULL;
3174
- PyObject *__pyx_t_7 = NULL;
3175
3326
  int __pyx_lineno = 0;
3176
3327
  const char *__pyx_filename = NULL;
3177
3328
  int __pyx_clineno = 0;
3178
3329
  __Pyx_RefNannySetupContext("calc_cubic_points", 0);
3179
3330
 
3180
- /* "fontTools/cu2qu/cu2qu.py":61
3331
+ /* "fontTools/cu2qu/cu2qu.py":87
3181
3332
  * )
3182
3333
  * def calc_cubic_points(a, b, c, d):
3183
3334
  * _1 = d # <<<<<<<<<<<<<<
3184
- * _2 = (c / 3.0) + d
3185
- * _3 = (b + c) / 3.0 + _2
3335
+ * _2 = _complex_div_by_real(c, 3.0) + d
3336
+ * _3 = _complex_div_by_real(b + c, 3.0) + _2
3186
3337
  */
3187
3338
  __pyx_v__1 = __pyx_v_d;
3188
3339
 
3189
- /* "fontTools/cu2qu/cu2qu.py":62
3340
+ /* "fontTools/cu2qu/cu2qu.py":88
3190
3341
  * def calc_cubic_points(a, b, c, d):
3191
3342
  * _1 = d
3192
- * _2 = (c / 3.0) + d # <<<<<<<<<<<<<<
3193
- * _3 = (b + c) / 3.0 + _2
3343
+ * _2 = _complex_div_by_real(c, 3.0) + d # <<<<<<<<<<<<<<
3344
+ * _3 = _complex_div_by_real(b + c, 3.0) + _2
3194
3345
  * _4 = a + d + c + b
3195
3346
  */
3196
- __pyx_t_1 = __pyx_t_double_complex_from_parts(3.0, 0);
3197
- if (unlikely(__Pyx_c_is_zero_double(__pyx_t_1))) {
3198
- PyErr_SetString(PyExc_ZeroDivisionError, "float division");
3199
- __PYX_ERR(0, 62, __pyx_L1_error)
3200
- }
3201
- __pyx_v__2 = __Pyx_c_sum_double(__Pyx_c_quot_double(__pyx_v_c, __pyx_t_1), __pyx_v_d);
3347
+ __pyx_t_1 = __pyx_f_9fontTools_5cu2qu_5cu2qu__complex_div_by_real(__pyx_v_c, 3.0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error)
3348
+ __Pyx_GOTREF(__pyx_t_1);
3349
+ __pyx_t_2 = __pyx_PyComplex_FromComplex(__pyx_v_d); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
3350
+ __Pyx_GOTREF(__pyx_t_2);
3351
+ __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 88, __pyx_L1_error)
3352
+ __Pyx_GOTREF(__pyx_t_3);
3353
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3354
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3355
+ __pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 88, __pyx_L1_error)
3356
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3357
+ __pyx_v__2 = __pyx_t_4;
3202
3358
 
3203
- /* "fontTools/cu2qu/cu2qu.py":63
3359
+ /* "fontTools/cu2qu/cu2qu.py":89
3204
3360
  * _1 = d
3205
- * _2 = (c / 3.0) + d
3206
- * _3 = (b + c) / 3.0 + _2 # <<<<<<<<<<<<<<
3361
+ * _2 = _complex_div_by_real(c, 3.0) + d
3362
+ * _3 = _complex_div_by_real(b + c, 3.0) + _2 # <<<<<<<<<<<<<<
3207
3363
  * _4 = a + d + c + b
3208
3364
  * return _1, _2, _3, _4
3209
3365
  */
3210
- __pyx_t_1 = __Pyx_c_sum_double(__pyx_v_b, __pyx_v_c);
3211
- __pyx_t_2 = __pyx_t_double_complex_from_parts(3.0, 0);
3212
- if (unlikely(__Pyx_c_is_zero_double(__pyx_t_2))) {
3213
- PyErr_SetString(PyExc_ZeroDivisionError, "float division");
3214
- __PYX_ERR(0, 63, __pyx_L1_error)
3215
- }
3216
- __pyx_v__3 = __Pyx_c_sum_double(__Pyx_c_quot_double(__pyx_t_1, __pyx_t_2), __pyx_v__2);
3366
+ __pyx_t_3 = __pyx_f_9fontTools_5cu2qu_5cu2qu__complex_div_by_real(__Pyx_c_sum_double(__pyx_v_b, __pyx_v_c), 3.0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 89, __pyx_L1_error)
3367
+ __Pyx_GOTREF(__pyx_t_3);
3368
+ __pyx_t_2 = __pyx_PyComplex_FromComplex(__pyx_v__2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error)
3369
+ __Pyx_GOTREF(__pyx_t_2);
3370
+ __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error)
3371
+ __Pyx_GOTREF(__pyx_t_1);
3372
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3373
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3374
+ __pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 89, __pyx_L1_error)
3375
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3376
+ __pyx_v__3 = __pyx_t_4;
3217
3377
 
3218
- /* "fontTools/cu2qu/cu2qu.py":64
3219
- * _2 = (c / 3.0) + d
3220
- * _3 = (b + c) / 3.0 + _2
3378
+ /* "fontTools/cu2qu/cu2qu.py":90
3379
+ * _2 = _complex_div_by_real(c, 3.0) + d
3380
+ * _3 = _complex_div_by_real(b + c, 3.0) + _2
3221
3381
  * _4 = a + d + c + b # <<<<<<<<<<<<<<
3222
3382
  * return _1, _2, _3, _4
3223
3383
  *
3224
3384
  */
3225
3385
  __pyx_v__4 = __Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__pyx_v_a, __pyx_v_d), __pyx_v_c), __pyx_v_b);
3226
3386
 
3227
- /* "fontTools/cu2qu/cu2qu.py":65
3228
- * _3 = (b + c) / 3.0 + _2
3387
+ /* "fontTools/cu2qu/cu2qu.py":91
3388
+ * _3 = _complex_div_by_real(b + c, 3.0) + _2
3229
3389
  * _4 = a + d + c + b
3230
3390
  * return _1, _2, _3, _4 # <<<<<<<<<<<<<<
3231
3391
  *
3232
3392
  *
3233
3393
  */
3234
3394
  __Pyx_XDECREF(__pyx_r);
3235
- __pyx_t_3 = __pyx_PyComplex_FromComplex(__pyx_v__1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error)
3395
+ __pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v__1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error)
3396
+ __Pyx_GOTREF(__pyx_t_1);
3397
+ __pyx_t_2 = __pyx_PyComplex_FromComplex(__pyx_v__2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error)
3398
+ __Pyx_GOTREF(__pyx_t_2);
3399
+ __pyx_t_3 = __pyx_PyComplex_FromComplex(__pyx_v__3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 91, __pyx_L1_error)
3236
3400
  __Pyx_GOTREF(__pyx_t_3);
3237
- __pyx_t_4 = __pyx_PyComplex_FromComplex(__pyx_v__2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L1_error)
3238
- __Pyx_GOTREF(__pyx_t_4);
3239
- __pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_v__3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 65, __pyx_L1_error)
3401
+ __pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_v__4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 91, __pyx_L1_error)
3240
3402
  __Pyx_GOTREF(__pyx_t_5);
3241
- __pyx_t_6 = __pyx_PyComplex_FromComplex(__pyx_v__4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 65, __pyx_L1_error)
3403
+ __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 91, __pyx_L1_error)
3242
3404
  __Pyx_GOTREF(__pyx_t_6);
3243
- __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 65, __pyx_L1_error)
3244
- __Pyx_GOTREF(__pyx_t_7);
3405
+ __Pyx_GIVEREF(__pyx_t_1);
3406
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 91, __pyx_L1_error);
3407
+ __Pyx_GIVEREF(__pyx_t_2);
3408
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 91, __pyx_L1_error);
3245
3409
  __Pyx_GIVEREF(__pyx_t_3);
3246
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 65, __pyx_L1_error);
3247
- __Pyx_GIVEREF(__pyx_t_4);
3248
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4) != (0)) __PYX_ERR(0, 65, __pyx_L1_error);
3410
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 91, __pyx_L1_error);
3249
3411
  __Pyx_GIVEREF(__pyx_t_5);
3250
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_5) != (0)) __PYX_ERR(0, 65, __pyx_L1_error);
3251
- __Pyx_GIVEREF(__pyx_t_6);
3252
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_6) != (0)) __PYX_ERR(0, 65, __pyx_L1_error);
3412
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5) != (0)) __PYX_ERR(0, 91, __pyx_L1_error);
3413
+ __pyx_t_1 = 0;
3414
+ __pyx_t_2 = 0;
3253
3415
  __pyx_t_3 = 0;
3254
- __pyx_t_4 = 0;
3255
3416
  __pyx_t_5 = 0;
3417
+ __pyx_r = __pyx_t_6;
3256
3418
  __pyx_t_6 = 0;
3257
- __pyx_r = __pyx_t_7;
3258
- __pyx_t_7 = 0;
3259
3419
  goto __pyx_L0;
3260
3420
 
3261
- /* "fontTools/cu2qu/cu2qu.py":54
3421
+ /* "fontTools/cu2qu/cu2qu.py":80
3262
3422
  *
3263
3423
  *
3264
3424
  * @cython.cfunc # <<<<<<<<<<<<<<
@@ -3268,11 +3428,11 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_point
3268
3428
 
3269
3429
  /* function exit code */
3270
3430
  __pyx_L1_error:;
3431
+ __Pyx_XDECREF(__pyx_t_1);
3432
+ __Pyx_XDECREF(__pyx_t_2);
3271
3433
  __Pyx_XDECREF(__pyx_t_3);
3272
- __Pyx_XDECREF(__pyx_t_4);
3273
3434
  __Pyx_XDECREF(__pyx_t_5);
3274
3435
  __Pyx_XDECREF(__pyx_t_6);
3275
- __Pyx_XDECREF(__pyx_t_7);
3276
3436
  __Pyx_AddTraceback("fontTools.cu2qu.cu2qu.calc_cubic_points", __pyx_clineno, __pyx_lineno, __pyx_filename);
3277
3437
  __pyx_r = 0;
3278
3438
  __pyx_L0:;
@@ -3281,7 +3441,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_point
3281
3441
  return __pyx_r;
3282
3442
  }
3283
3443
 
3284
- /* "fontTools/cu2qu/cu2qu.py":68
3444
+ /* "fontTools/cu2qu/cu2qu.py":94
3285
3445
  *
3286
3446
  *
3287
3447
  * @cython.cfunc # <<<<<<<<<<<<<<
@@ -3306,7 +3466,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_param
3306
3466
  int __pyx_clineno = 0;
3307
3467
  __Pyx_RefNannySetupContext("calc_cubic_parameters", 0);
3308
3468
 
3309
- /* "fontTools/cu2qu/cu2qu.py":75
3469
+ /* "fontTools/cu2qu/cu2qu.py":101
3310
3470
  * @cython.locals(a=cython.complex, b=cython.complex, c=cython.complex, d=cython.complex)
3311
3471
  * def calc_cubic_parameters(p0, p1, p2, p3):
3312
3472
  * c = (p1 - p0) * 3.0 # <<<<<<<<<<<<<<
@@ -3315,7 +3475,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_param
3315
3475
  */
3316
3476
  __pyx_v_c = __Pyx_c_prod_double(__Pyx_c_diff_double(__pyx_v_p1, __pyx_v_p0), __pyx_t_double_complex_from_parts(3.0, 0));
3317
3477
 
3318
- /* "fontTools/cu2qu/cu2qu.py":76
3478
+ /* "fontTools/cu2qu/cu2qu.py":102
3319
3479
  * def calc_cubic_parameters(p0, p1, p2, p3):
3320
3480
  * c = (p1 - p0) * 3.0
3321
3481
  * b = (p2 - p1) * 3.0 - c # <<<<<<<<<<<<<<
@@ -3324,7 +3484,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_param
3324
3484
  */
3325
3485
  __pyx_v_b = __Pyx_c_diff_double(__Pyx_c_prod_double(__Pyx_c_diff_double(__pyx_v_p2, __pyx_v_p1), __pyx_t_double_complex_from_parts(3.0, 0)), __pyx_v_c);
3326
3486
 
3327
- /* "fontTools/cu2qu/cu2qu.py":77
3487
+ /* "fontTools/cu2qu/cu2qu.py":103
3328
3488
  * c = (p1 - p0) * 3.0
3329
3489
  * b = (p2 - p1) * 3.0 - c
3330
3490
  * d = p0 # <<<<<<<<<<<<<<
@@ -3333,7 +3493,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_param
3333
3493
  */
3334
3494
  __pyx_v_d = __pyx_v_p0;
3335
3495
 
3336
- /* "fontTools/cu2qu/cu2qu.py":78
3496
+ /* "fontTools/cu2qu/cu2qu.py":104
3337
3497
  * b = (p2 - p1) * 3.0 - c
3338
3498
  * d = p0
3339
3499
  * a = p3 - d - c - b # <<<<<<<<<<<<<<
@@ -3342,7 +3502,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_param
3342
3502
  */
3343
3503
  __pyx_v_a = __Pyx_c_diff_double(__Pyx_c_diff_double(__Pyx_c_diff_double(__pyx_v_p3, __pyx_v_d), __pyx_v_c), __pyx_v_b);
3344
3504
 
3345
- /* "fontTools/cu2qu/cu2qu.py":79
3505
+ /* "fontTools/cu2qu/cu2qu.py":105
3346
3506
  * d = p0
3347
3507
  * a = p3 - d - c - b
3348
3508
  * return a, b, c, d # <<<<<<<<<<<<<<
@@ -3350,24 +3510,24 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_param
3350
3510
  *
3351
3511
  */
3352
3512
  __Pyx_XDECREF(__pyx_r);
3353
- __pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_a); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error)
3513
+ __pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_a); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error)
3354
3514
  __Pyx_GOTREF(__pyx_t_1);
3355
- __pyx_t_2 = __pyx_PyComplex_FromComplex(__pyx_v_b); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error)
3515
+ __pyx_t_2 = __pyx_PyComplex_FromComplex(__pyx_v_b); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error)
3356
3516
  __Pyx_GOTREF(__pyx_t_2);
3357
- __pyx_t_3 = __pyx_PyComplex_FromComplex(__pyx_v_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 79, __pyx_L1_error)
3517
+ __pyx_t_3 = __pyx_PyComplex_FromComplex(__pyx_v_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 105, __pyx_L1_error)
3358
3518
  __Pyx_GOTREF(__pyx_t_3);
3359
- __pyx_t_4 = __pyx_PyComplex_FromComplex(__pyx_v_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 79, __pyx_L1_error)
3519
+ __pyx_t_4 = __pyx_PyComplex_FromComplex(__pyx_v_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 105, __pyx_L1_error)
3360
3520
  __Pyx_GOTREF(__pyx_t_4);
3361
- __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 79, __pyx_L1_error)
3521
+ __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 105, __pyx_L1_error)
3362
3522
  __Pyx_GOTREF(__pyx_t_5);
3363
3523
  __Pyx_GIVEREF(__pyx_t_1);
3364
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 79, __pyx_L1_error);
3524
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 105, __pyx_L1_error);
3365
3525
  __Pyx_GIVEREF(__pyx_t_2);
3366
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 79, __pyx_L1_error);
3526
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 105, __pyx_L1_error);
3367
3527
  __Pyx_GIVEREF(__pyx_t_3);
3368
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 79, __pyx_L1_error);
3528
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 105, __pyx_L1_error);
3369
3529
  __Pyx_GIVEREF(__pyx_t_4);
3370
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4) != (0)) __PYX_ERR(0, 79, __pyx_L1_error);
3530
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4) != (0)) __PYX_ERR(0, 105, __pyx_L1_error);
3371
3531
  __pyx_t_1 = 0;
3372
3532
  __pyx_t_2 = 0;
3373
3533
  __pyx_t_3 = 0;
@@ -3376,7 +3536,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_param
3376
3536
  __pyx_t_5 = 0;
3377
3537
  goto __pyx_L0;
3378
3538
 
3379
- /* "fontTools/cu2qu/cu2qu.py":68
3539
+ /* "fontTools/cu2qu/cu2qu.py":94
3380
3540
  *
3381
3541
  *
3382
3542
  * @cython.cfunc # <<<<<<<<<<<<<<
@@ -3399,7 +3559,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_param
3399
3559
  return __pyx_r;
3400
3560
  }
3401
3561
 
3402
- /* "fontTools/cu2qu/cu2qu.py":82
3562
+ /* "fontTools/cu2qu/cu2qu.py":108
3403
3563
  *
3404
3564
  *
3405
3565
  * @cython.cfunc # <<<<<<<<<<<<<<
@@ -3431,17 +3591,17 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
3431
3591
  int __pyx_clineno = 0;
3432
3592
  __Pyx_RefNannySetupContext("split_cubic_into_n_iter", 0);
3433
3593
 
3434
- /* "fontTools/cu2qu/cu2qu.py":104
3594
+ /* "fontTools/cu2qu/cu2qu.py":130
3435
3595
  * """
3436
3596
  * # Hand-coded special-cases
3437
3597
  * if n == 2: # <<<<<<<<<<<<<<
3438
3598
  * return iter(split_cubic_into_two(p0, p1, p2, p3))
3439
3599
  * if n == 3:
3440
3600
  */
3441
- __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_n, __pyx_mstate_global->__pyx_int_2, 2, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 104, __pyx_L1_error)
3601
+ __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_n, __pyx_mstate_global->__pyx_int_2, 2, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 130, __pyx_L1_error)
3442
3602
  if (__pyx_t_1) {
3443
3603
 
3444
- /* "fontTools/cu2qu/cu2qu.py":105
3604
+ /* "fontTools/cu2qu/cu2qu.py":131
3445
3605
  * # Hand-coded special-cases
3446
3606
  * if n == 2:
3447
3607
  * return iter(split_cubic_into_two(p0, p1, p2, p3)) # <<<<<<<<<<<<<<
@@ -3449,16 +3609,16 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
3449
3609
  * return iter(split_cubic_into_three(p0, p1, p2, p3))
3450
3610
  */
3451
3611
  __Pyx_XDECREF(__pyx_r);
3452
- __pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_two(__pyx_v_p0, __pyx_v_p1, __pyx_v_p2, __pyx_v_p3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error)
3612
+ __pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_two(__pyx_v_p0, __pyx_v_p1, __pyx_v_p2, __pyx_v_p3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error)
3453
3613
  __Pyx_GOTREF(__pyx_t_2);
3454
- __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 105, __pyx_L1_error)
3614
+ __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error)
3455
3615
  __Pyx_GOTREF(__pyx_t_3);
3456
3616
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3457
3617
  __pyx_r = __pyx_t_3;
3458
3618
  __pyx_t_3 = 0;
3459
3619
  goto __pyx_L0;
3460
3620
 
3461
- /* "fontTools/cu2qu/cu2qu.py":104
3621
+ /* "fontTools/cu2qu/cu2qu.py":130
3462
3622
  * """
3463
3623
  * # Hand-coded special-cases
3464
3624
  * if n == 2: # <<<<<<<<<<<<<<
@@ -3467,17 +3627,17 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
3467
3627
  */
3468
3628
  }
3469
3629
 
3470
- /* "fontTools/cu2qu/cu2qu.py":106
3630
+ /* "fontTools/cu2qu/cu2qu.py":132
3471
3631
  * if n == 2:
3472
3632
  * return iter(split_cubic_into_two(p0, p1, p2, p3))
3473
3633
  * if n == 3: # <<<<<<<<<<<<<<
3474
3634
  * return iter(split_cubic_into_three(p0, p1, p2, p3))
3475
3635
  * if n == 4:
3476
3636
  */
3477
- __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_n, __pyx_mstate_global->__pyx_int_3, 3, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 106, __pyx_L1_error)
3637
+ __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_n, __pyx_mstate_global->__pyx_int_3, 3, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 132, __pyx_L1_error)
3478
3638
  if (__pyx_t_1) {
3479
3639
 
3480
- /* "fontTools/cu2qu/cu2qu.py":107
3640
+ /* "fontTools/cu2qu/cu2qu.py":133
3481
3641
  * return iter(split_cubic_into_two(p0, p1, p2, p3))
3482
3642
  * if n == 3:
3483
3643
  * return iter(split_cubic_into_three(p0, p1, p2, p3)) # <<<<<<<<<<<<<<
@@ -3485,16 +3645,16 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
3485
3645
  * a, b = split_cubic_into_two(p0, p1, p2, p3)
3486
3646
  */
3487
3647
  __Pyx_XDECREF(__pyx_r);
3488
- __pyx_t_3 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_three(__pyx_v_p0, __pyx_v_p1, __pyx_v_p2, __pyx_v_p3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error)
3648
+ __pyx_t_3 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_three(__pyx_v_p0, __pyx_v_p1, __pyx_v_p2, __pyx_v_p3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 133, __pyx_L1_error)
3489
3649
  __Pyx_GOTREF(__pyx_t_3);
3490
- __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error)
3650
+ __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error)
3491
3651
  __Pyx_GOTREF(__pyx_t_2);
3492
3652
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3493
3653
  __pyx_r = __pyx_t_2;
3494
3654
  __pyx_t_2 = 0;
3495
3655
  goto __pyx_L0;
3496
3656
 
3497
- /* "fontTools/cu2qu/cu2qu.py":106
3657
+ /* "fontTools/cu2qu/cu2qu.py":132
3498
3658
  * if n == 2:
3499
3659
  * return iter(split_cubic_into_two(p0, p1, p2, p3))
3500
3660
  * if n == 3: # <<<<<<<<<<<<<<
@@ -3503,24 +3663,24 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
3503
3663
  */
3504
3664
  }
3505
3665
 
3506
- /* "fontTools/cu2qu/cu2qu.py":108
3666
+ /* "fontTools/cu2qu/cu2qu.py":134
3507
3667
  * if n == 3:
3508
3668
  * return iter(split_cubic_into_three(p0, p1, p2, p3))
3509
3669
  * if n == 4: # <<<<<<<<<<<<<<
3510
3670
  * a, b = split_cubic_into_two(p0, p1, p2, p3)
3511
3671
  * return iter(
3512
3672
  */
3513
- __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_n, __pyx_mstate_global->__pyx_int_4, 4, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 108, __pyx_L1_error)
3673
+ __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_n, __pyx_mstate_global->__pyx_int_4, 4, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 134, __pyx_L1_error)
3514
3674
  if (__pyx_t_1) {
3515
3675
 
3516
- /* "fontTools/cu2qu/cu2qu.py":109
3676
+ /* "fontTools/cu2qu/cu2qu.py":135
3517
3677
  * return iter(split_cubic_into_three(p0, p1, p2, p3))
3518
3678
  * if n == 4:
3519
3679
  * a, b = split_cubic_into_two(p0, p1, p2, p3) # <<<<<<<<<<<<<<
3520
3680
  * return iter(
3521
3681
  * split_cubic_into_two(a[0], a[1], a[2], a[3])
3522
3682
  */
3523
- __pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_two(__pyx_v_p0, __pyx_v_p1, __pyx_v_p2, __pyx_v_p3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error)
3683
+ __pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_two(__pyx_v_p0, __pyx_v_p1, __pyx_v_p2, __pyx_v_p3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error)
3524
3684
  __Pyx_GOTREF(__pyx_t_2);
3525
3685
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
3526
3686
  PyObject* sequence = __pyx_t_2;
@@ -3528,7 +3688,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
3528
3688
  if (unlikely(size != 2)) {
3529
3689
  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
3530
3690
  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
3531
- __PYX_ERR(0, 109, __pyx_L1_error)
3691
+ __PYX_ERR(0, 135, __pyx_L1_error)
3532
3692
  }
3533
3693
  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3534
3694
  if (likely(PyTuple_CheckExact(sequence))) {
@@ -3538,22 +3698,22 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
3538
3698
  __Pyx_INCREF(__pyx_t_4);
3539
3699
  } else {
3540
3700
  __pyx_t_3 = __Pyx_PyList_GetItemRef(sequence, 0);
3541
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 109, __pyx_L1_error)
3701
+ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 135, __pyx_L1_error)
3542
3702
  __Pyx_XGOTREF(__pyx_t_3);
3543
3703
  __pyx_t_4 = __Pyx_PyList_GetItemRef(sequence, 1);
3544
- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L1_error)
3704
+ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 135, __pyx_L1_error)
3545
3705
  __Pyx_XGOTREF(__pyx_t_4);
3546
3706
  }
3547
3707
  #else
3548
- __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 109, __pyx_L1_error)
3708
+ __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 135, __pyx_L1_error)
3549
3709
  __Pyx_GOTREF(__pyx_t_3);
3550
- __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L1_error)
3710
+ __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 135, __pyx_L1_error)
3551
3711
  __Pyx_GOTREF(__pyx_t_4);
3552
3712
  #endif
3553
3713
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3554
3714
  } else {
3555
3715
  Py_ssize_t index = -1;
3556
- __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 109, __pyx_L1_error)
3716
+ __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 135, __pyx_L1_error)
3557
3717
  __Pyx_GOTREF(__pyx_t_5);
3558
3718
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3559
3719
  __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
@@ -3561,7 +3721,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
3561
3721
  __Pyx_GOTREF(__pyx_t_3);
3562
3722
  index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed;
3563
3723
  __Pyx_GOTREF(__pyx_t_4);
3564
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
3724
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0, 135, __pyx_L1_error)
3565
3725
  __pyx_t_6 = NULL;
3566
3726
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3567
3727
  goto __pyx_L7_unpacking_done;
@@ -3569,7 +3729,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
3569
3729
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3570
3730
  __pyx_t_6 = NULL;
3571
3731
  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
3572
- __PYX_ERR(0, 109, __pyx_L1_error)
3732
+ __PYX_ERR(0, 135, __pyx_L1_error)
3573
3733
  __pyx_L7_unpacking_done:;
3574
3734
  }
3575
3735
  __pyx_v_a = __pyx_t_3;
@@ -3577,7 +3737,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
3577
3737
  __pyx_v_b = __pyx_t_4;
3578
3738
  __pyx_t_4 = 0;
3579
3739
 
3580
- /* "fontTools/cu2qu/cu2qu.py":110
3740
+ /* "fontTools/cu2qu/cu2qu.py":136
3581
3741
  * if n == 4:
3582
3742
  * a, b = split_cubic_into_two(p0, p1, p2, p3)
3583
3743
  * return iter( # <<<<<<<<<<<<<<
@@ -3586,77 +3746,77 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
3586
3746
  */
3587
3747
  __Pyx_XDECREF(__pyx_r);
3588
3748
 
3589
- /* "fontTools/cu2qu/cu2qu.py":111
3749
+ /* "fontTools/cu2qu/cu2qu.py":137
3590
3750
  * a, b = split_cubic_into_two(p0, p1, p2, p3)
3591
3751
  * return iter(
3592
3752
  * split_cubic_into_two(a[0], a[1], a[2], a[3]) # <<<<<<<<<<<<<<
3593
3753
  * + split_cubic_into_two(b[0], b[1], b[2], b[3])
3594
3754
  * )
3595
3755
  */
3596
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_a, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
3756
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_a, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error)
3597
3757
  __Pyx_GOTREF(__pyx_t_2);
3598
- __pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L1_error)
3758
+ __pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 137, __pyx_L1_error)
3599
3759
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3600
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_a, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
3760
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_a, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error)
3601
3761
  __Pyx_GOTREF(__pyx_t_2);
3602
- __pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L1_error)
3762
+ __pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 137, __pyx_L1_error)
3603
3763
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3604
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_a, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
3764
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_a, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error)
3605
3765
  __Pyx_GOTREF(__pyx_t_2);
3606
- __pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L1_error)
3766
+ __pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 137, __pyx_L1_error)
3607
3767
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3608
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_a, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
3768
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_a, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error)
3609
3769
  __Pyx_GOTREF(__pyx_t_2);
3610
- __pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L1_error)
3770
+ __pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 137, __pyx_L1_error)
3611
3771
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3612
- __pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_two(__pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
3772
+ __pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_two(__pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error)
3613
3773
  __Pyx_GOTREF(__pyx_t_2);
3614
3774
 
3615
- /* "fontTools/cu2qu/cu2qu.py":112
3775
+ /* "fontTools/cu2qu/cu2qu.py":138
3616
3776
  * return iter(
3617
3777
  * split_cubic_into_two(a[0], a[1], a[2], a[3])
3618
3778
  * + split_cubic_into_two(b[0], b[1], b[2], b[3]) # <<<<<<<<<<<<<<
3619
3779
  * )
3620
3780
  * if n == 6:
3621
3781
  */
3622
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
3782
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 138, __pyx_L1_error)
3623
3783
  __Pyx_GOTREF(__pyx_t_4);
3624
- __pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L1_error)
3784
+ __pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 138, __pyx_L1_error)
3625
3785
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3626
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
3786
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 138, __pyx_L1_error)
3627
3787
  __Pyx_GOTREF(__pyx_t_4);
3628
- __pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L1_error)
3788
+ __pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 138, __pyx_L1_error)
3629
3789
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3630
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
3790
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 138, __pyx_L1_error)
3631
3791
  __Pyx_GOTREF(__pyx_t_4);
3632
- __pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L1_error)
3792
+ __pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 138, __pyx_L1_error)
3633
3793
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3634
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
3794
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 138, __pyx_L1_error)
3635
3795
  __Pyx_GOTREF(__pyx_t_4);
3636
- __pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L1_error)
3796
+ __pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 138, __pyx_L1_error)
3637
3797
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3638
- __pyx_t_4 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_two(__pyx_t_10, __pyx_t_9, __pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
3798
+ __pyx_t_4 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_two(__pyx_t_10, __pyx_t_9, __pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 138, __pyx_L1_error)
3639
3799
  __Pyx_GOTREF(__pyx_t_4);
3640
- __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 112, __pyx_L1_error)
3800
+ __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 138, __pyx_L1_error)
3641
3801
  __Pyx_GOTREF(__pyx_t_3);
3642
3802
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3643
3803
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3644
3804
 
3645
- /* "fontTools/cu2qu/cu2qu.py":110
3805
+ /* "fontTools/cu2qu/cu2qu.py":136
3646
3806
  * if n == 4:
3647
3807
  * a, b = split_cubic_into_two(p0, p1, p2, p3)
3648
3808
  * return iter( # <<<<<<<<<<<<<<
3649
3809
  * split_cubic_into_two(a[0], a[1], a[2], a[3])
3650
3810
  * + split_cubic_into_two(b[0], b[1], b[2], b[3])
3651
3811
  */
3652
- __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 110, __pyx_L1_error)
3812
+ __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 136, __pyx_L1_error)
3653
3813
  __Pyx_GOTREF(__pyx_t_4);
3654
3814
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3655
3815
  __pyx_r = __pyx_t_4;
3656
3816
  __pyx_t_4 = 0;
3657
3817
  goto __pyx_L0;
3658
3818
 
3659
- /* "fontTools/cu2qu/cu2qu.py":108
3819
+ /* "fontTools/cu2qu/cu2qu.py":134
3660
3820
  * if n == 3:
3661
3821
  * return iter(split_cubic_into_three(p0, p1, p2, p3))
3662
3822
  * if n == 4: # <<<<<<<<<<<<<<
@@ -3665,24 +3825,24 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
3665
3825
  */
3666
3826
  }
3667
3827
 
3668
- /* "fontTools/cu2qu/cu2qu.py":114
3828
+ /* "fontTools/cu2qu/cu2qu.py":140
3669
3829
  * + split_cubic_into_two(b[0], b[1], b[2], b[3])
3670
3830
  * )
3671
3831
  * if n == 6: # <<<<<<<<<<<<<<
3672
3832
  * a, b = split_cubic_into_two(p0, p1, p2, p3)
3673
3833
  * return iter(
3674
3834
  */
3675
- __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_n, __pyx_mstate_global->__pyx_int_6, 6, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 114, __pyx_L1_error)
3835
+ __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_n, __pyx_mstate_global->__pyx_int_6, 6, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 140, __pyx_L1_error)
3676
3836
  if (__pyx_t_1) {
3677
3837
 
3678
- /* "fontTools/cu2qu/cu2qu.py":115
3838
+ /* "fontTools/cu2qu/cu2qu.py":141
3679
3839
  * )
3680
3840
  * if n == 6:
3681
3841
  * a, b = split_cubic_into_two(p0, p1, p2, p3) # <<<<<<<<<<<<<<
3682
3842
  * return iter(
3683
3843
  * split_cubic_into_three(a[0], a[1], a[2], a[3])
3684
3844
  */
3685
- __pyx_t_4 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_two(__pyx_v_p0, __pyx_v_p1, __pyx_v_p2, __pyx_v_p3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 115, __pyx_L1_error)
3845
+ __pyx_t_4 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_two(__pyx_v_p0, __pyx_v_p1, __pyx_v_p2, __pyx_v_p3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error)
3686
3846
  __Pyx_GOTREF(__pyx_t_4);
3687
3847
  if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
3688
3848
  PyObject* sequence = __pyx_t_4;
@@ -3690,7 +3850,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
3690
3850
  if (unlikely(size != 2)) {
3691
3851
  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
3692
3852
  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
3693
- __PYX_ERR(0, 115, __pyx_L1_error)
3853
+ __PYX_ERR(0, 141, __pyx_L1_error)
3694
3854
  }
3695
3855
  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3696
3856
  if (likely(PyTuple_CheckExact(sequence))) {
@@ -3700,22 +3860,22 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
3700
3860
  __Pyx_INCREF(__pyx_t_2);
3701
3861
  } else {
3702
3862
  __pyx_t_3 = __Pyx_PyList_GetItemRef(sequence, 0);
3703
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error)
3863
+ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 141, __pyx_L1_error)
3704
3864
  __Pyx_XGOTREF(__pyx_t_3);
3705
3865
  __pyx_t_2 = __Pyx_PyList_GetItemRef(sequence, 1);
3706
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 115, __pyx_L1_error)
3866
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error)
3707
3867
  __Pyx_XGOTREF(__pyx_t_2);
3708
3868
  }
3709
3869
  #else
3710
- __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error)
3870
+ __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 141, __pyx_L1_error)
3711
3871
  __Pyx_GOTREF(__pyx_t_3);
3712
- __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 115, __pyx_L1_error)
3872
+ __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error)
3713
3873
  __Pyx_GOTREF(__pyx_t_2);
3714
3874
  #endif
3715
3875
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3716
3876
  } else {
3717
3877
  Py_ssize_t index = -1;
3718
- __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 115, __pyx_L1_error)
3878
+ __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 141, __pyx_L1_error)
3719
3879
  __Pyx_GOTREF(__pyx_t_5);
3720
3880
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3721
3881
  __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
@@ -3723,7 +3883,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
3723
3883
  __Pyx_GOTREF(__pyx_t_3);
3724
3884
  index = 1; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L9_unpacking_failed;
3725
3885
  __Pyx_GOTREF(__pyx_t_2);
3726
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
3886
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0, 141, __pyx_L1_error)
3727
3887
  __pyx_t_6 = NULL;
3728
3888
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3729
3889
  goto __pyx_L10_unpacking_done;
@@ -3731,7 +3891,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
3731
3891
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3732
3892
  __pyx_t_6 = NULL;
3733
3893
  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
3734
- __PYX_ERR(0, 115, __pyx_L1_error)
3894
+ __PYX_ERR(0, 141, __pyx_L1_error)
3735
3895
  __pyx_L10_unpacking_done:;
3736
3896
  }
3737
3897
  __pyx_v_a = __pyx_t_3;
@@ -3739,7 +3899,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
3739
3899
  __pyx_v_b = __pyx_t_2;
3740
3900
  __pyx_t_2 = 0;
3741
3901
 
3742
- /* "fontTools/cu2qu/cu2qu.py":116
3902
+ /* "fontTools/cu2qu/cu2qu.py":142
3743
3903
  * if n == 6:
3744
3904
  * a, b = split_cubic_into_two(p0, p1, p2, p3)
3745
3905
  * return iter( # <<<<<<<<<<<<<<
@@ -3748,77 +3908,77 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
3748
3908
  */
3749
3909
  __Pyx_XDECREF(__pyx_r);
3750
3910
 
3751
- /* "fontTools/cu2qu/cu2qu.py":117
3911
+ /* "fontTools/cu2qu/cu2qu.py":143
3752
3912
  * a, b = split_cubic_into_two(p0, p1, p2, p3)
3753
3913
  * return iter(
3754
3914
  * split_cubic_into_three(a[0], a[1], a[2], a[3]) # <<<<<<<<<<<<<<
3755
3915
  * + split_cubic_into_three(b[0], b[1], b[2], b[3])
3756
3916
  * )
3757
3917
  */
3758
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_a, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error)
3918
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_a, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 143, __pyx_L1_error)
3759
3919
  __Pyx_GOTREF(__pyx_t_4);
3760
- __pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 117, __pyx_L1_error)
3920
+ __pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 143, __pyx_L1_error)
3761
3921
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3762
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_a, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error)
3922
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_a, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 143, __pyx_L1_error)
3763
3923
  __Pyx_GOTREF(__pyx_t_4);
3764
- __pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 117, __pyx_L1_error)
3924
+ __pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 143, __pyx_L1_error)
3765
3925
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3766
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_a, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error)
3926
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_a, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 143, __pyx_L1_error)
3767
3927
  __Pyx_GOTREF(__pyx_t_4);
3768
- __pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 117, __pyx_L1_error)
3928
+ __pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 143, __pyx_L1_error)
3769
3929
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3770
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_a, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error)
3930
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_a, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 143, __pyx_L1_error)
3771
3931
  __Pyx_GOTREF(__pyx_t_4);
3772
- __pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 117, __pyx_L1_error)
3932
+ __pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 143, __pyx_L1_error)
3773
3933
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3774
- __pyx_t_4 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_three(__pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error)
3934
+ __pyx_t_4 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_three(__pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 143, __pyx_L1_error)
3775
3935
  __Pyx_GOTREF(__pyx_t_4);
3776
3936
 
3777
- /* "fontTools/cu2qu/cu2qu.py":118
3937
+ /* "fontTools/cu2qu/cu2qu.py":144
3778
3938
  * return iter(
3779
3939
  * split_cubic_into_three(a[0], a[1], a[2], a[3])
3780
3940
  * + split_cubic_into_three(b[0], b[1], b[2], b[3]) # <<<<<<<<<<<<<<
3781
3941
  * )
3782
3942
  *
3783
3943
  */
3784
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
3944
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
3785
3945
  __Pyx_GOTREF(__pyx_t_2);
3786
- __pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L1_error)
3946
+ __pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 144, __pyx_L1_error)
3787
3947
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3788
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
3948
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
3789
3949
  __Pyx_GOTREF(__pyx_t_2);
3790
- __pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L1_error)
3950
+ __pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 144, __pyx_L1_error)
3791
3951
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3792
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
3952
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
3793
3953
  __Pyx_GOTREF(__pyx_t_2);
3794
- __pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L1_error)
3954
+ __pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 144, __pyx_L1_error)
3795
3955
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3796
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
3956
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
3797
3957
  __Pyx_GOTREF(__pyx_t_2);
3798
- __pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L1_error)
3958
+ __pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 144, __pyx_L1_error)
3799
3959
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3800
- __pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_three(__pyx_t_10, __pyx_t_9, __pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
3960
+ __pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_three(__pyx_t_10, __pyx_t_9, __pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
3801
3961
  __Pyx_GOTREF(__pyx_t_2);
3802
- __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 118, __pyx_L1_error)
3962
+ __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error)
3803
3963
  __Pyx_GOTREF(__pyx_t_3);
3804
3964
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3805
3965
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3806
3966
 
3807
- /* "fontTools/cu2qu/cu2qu.py":116
3967
+ /* "fontTools/cu2qu/cu2qu.py":142
3808
3968
  * if n == 6:
3809
3969
  * a, b = split_cubic_into_two(p0, p1, p2, p3)
3810
3970
  * return iter( # <<<<<<<<<<<<<<
3811
3971
  * split_cubic_into_three(a[0], a[1], a[2], a[3])
3812
3972
  * + split_cubic_into_three(b[0], b[1], b[2], b[3])
3813
3973
  */
3814
- __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 116, __pyx_L1_error)
3974
+ __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error)
3815
3975
  __Pyx_GOTREF(__pyx_t_2);
3816
3976
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3817
3977
  __pyx_r = __pyx_t_2;
3818
3978
  __pyx_t_2 = 0;
3819
3979
  goto __pyx_L0;
3820
3980
 
3821
- /* "fontTools/cu2qu/cu2qu.py":114
3981
+ /* "fontTools/cu2qu/cu2qu.py":140
3822
3982
  * + split_cubic_into_two(b[0], b[1], b[2], b[3])
3823
3983
  * )
3824
3984
  * if n == 6: # <<<<<<<<<<<<<<
@@ -3827,7 +3987,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
3827
3987
  */
3828
3988
  }
3829
3989
 
3830
- /* "fontTools/cu2qu/cu2qu.py":121
3990
+ /* "fontTools/cu2qu/cu2qu.py":147
3831
3991
  * )
3832
3992
  *
3833
3993
  * return _split_cubic_into_n_gen(p0, p1, p2, p3, n) # <<<<<<<<<<<<<<
@@ -3836,15 +3996,15 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
3836
3996
  */
3837
3997
  __Pyx_XDECREF(__pyx_r);
3838
3998
  __pyx_t_3 = NULL;
3839
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_split_cubic_into_n_gen); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 121, __pyx_L1_error)
3999
+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_split_cubic_into_n_gen); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 147, __pyx_L1_error)
3840
4000
  __Pyx_GOTREF(__pyx_t_4);
3841
- __pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_v_p0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 121, __pyx_L1_error)
4001
+ __pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_v_p0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 147, __pyx_L1_error)
3842
4002
  __Pyx_GOTREF(__pyx_t_5);
3843
- __pyx_t_11 = __pyx_PyComplex_FromComplex(__pyx_v_p1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 121, __pyx_L1_error)
4003
+ __pyx_t_11 = __pyx_PyComplex_FromComplex(__pyx_v_p1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 147, __pyx_L1_error)
3844
4004
  __Pyx_GOTREF(__pyx_t_11);
3845
- __pyx_t_12 = __pyx_PyComplex_FromComplex(__pyx_v_p2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 121, __pyx_L1_error)
4005
+ __pyx_t_12 = __pyx_PyComplex_FromComplex(__pyx_v_p2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 147, __pyx_L1_error)
3846
4006
  __Pyx_GOTREF(__pyx_t_12);
3847
- __pyx_t_13 = __pyx_PyComplex_FromComplex(__pyx_v_p3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 121, __pyx_L1_error)
4007
+ __pyx_t_13 = __pyx_PyComplex_FromComplex(__pyx_v_p3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 147, __pyx_L1_error)
3848
4008
  __Pyx_GOTREF(__pyx_t_13);
3849
4009
  __pyx_t_14 = 1;
3850
4010
  #if CYTHON_UNPACK_METHODS
@@ -3867,14 +4027,14 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
3867
4027
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
3868
4028
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
3869
4029
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3870
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 121, __pyx_L1_error)
4030
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
3871
4031
  __Pyx_GOTREF(__pyx_t_2);
3872
4032
  }
3873
4033
  __pyx_r = __pyx_t_2;
3874
4034
  __pyx_t_2 = 0;
3875
4035
  goto __pyx_L0;
3876
4036
 
3877
- /* "fontTools/cu2qu/cu2qu.py":82
4037
+ /* "fontTools/cu2qu/cu2qu.py":108
3878
4038
  *
3879
4039
  *
3880
4040
  * @cython.cfunc # <<<<<<<<<<<<<<
@@ -3902,7 +4062,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
3902
4062
  }
3903
4063
  static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
3904
4064
 
3905
- /* "fontTools/cu2qu/cu2qu.py":124
4065
+ /* "fontTools/cu2qu/cu2qu.py":150
3906
4066
  *
3907
4067
  *
3908
4068
  * @cython.locals( # <<<<<<<<<<<<<<
@@ -3954,60 +4114,60 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
3954
4114
  {
3955
4115
  PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_p0,&__pyx_mstate_global->__pyx_n_u_p1,&__pyx_mstate_global->__pyx_n_u_p2,&__pyx_mstate_global->__pyx_n_u_p3,&__pyx_mstate_global->__pyx_n_u_n,0};
3956
4116
  const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
3957
- if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 124, __pyx_L3_error)
4117
+ if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 150, __pyx_L3_error)
3958
4118
  if (__pyx_kwds_len > 0) {
3959
4119
  switch (__pyx_nargs) {
3960
4120
  case 5:
3961
4121
  values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
3962
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 124, __pyx_L3_error)
4122
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 150, __pyx_L3_error)
3963
4123
  CYTHON_FALLTHROUGH;
3964
4124
  case 4:
3965
4125
  values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
3966
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 124, __pyx_L3_error)
4126
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 150, __pyx_L3_error)
3967
4127
  CYTHON_FALLTHROUGH;
3968
4128
  case 3:
3969
4129
  values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
3970
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 124, __pyx_L3_error)
4130
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 150, __pyx_L3_error)
3971
4131
  CYTHON_FALLTHROUGH;
3972
4132
  case 2:
3973
4133
  values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
3974
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 124, __pyx_L3_error)
4134
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 150, __pyx_L3_error)
3975
4135
  CYTHON_FALLTHROUGH;
3976
4136
  case 1:
3977
4137
  values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
3978
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 124, __pyx_L3_error)
4138
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 150, __pyx_L3_error)
3979
4139
  CYTHON_FALLTHROUGH;
3980
4140
  case 0: break;
3981
4141
  default: goto __pyx_L5_argtuple_error;
3982
4142
  }
3983
4143
  const Py_ssize_t kwd_pos_args = __pyx_nargs;
3984
- if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_split_cubic_into_n_gen", 0) < 0) __PYX_ERR(0, 124, __pyx_L3_error)
4144
+ if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_split_cubic_into_n_gen", 0) < 0) __PYX_ERR(0, 150, __pyx_L3_error)
3985
4145
  for (Py_ssize_t i = __pyx_nargs; i < 5; i++) {
3986
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_split_cubic_into_n_gen", 1, 5, 5, i); __PYX_ERR(0, 124, __pyx_L3_error) }
4146
+ if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_split_cubic_into_n_gen", 1, 5, 5, i); __PYX_ERR(0, 150, __pyx_L3_error) }
3987
4147
  }
3988
4148
  } else if (unlikely(__pyx_nargs != 5)) {
3989
4149
  goto __pyx_L5_argtuple_error;
3990
4150
  } else {
3991
4151
  values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
3992
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 124, __pyx_L3_error)
4152
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 150, __pyx_L3_error)
3993
4153
  values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
3994
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 124, __pyx_L3_error)
4154
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 150, __pyx_L3_error)
3995
4155
  values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
3996
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 124, __pyx_L3_error)
4156
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 150, __pyx_L3_error)
3997
4157
  values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
3998
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 124, __pyx_L3_error)
4158
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 150, __pyx_L3_error)
3999
4159
  values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
4000
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 124, __pyx_L3_error)
4160
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 150, __pyx_L3_error)
4001
4161
  }
4002
- __pyx_v_p0 = __Pyx_PyComplex_As___pyx_t_double_complex(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 138, __pyx_L3_error)
4003
- __pyx_v_p1 = __Pyx_PyComplex_As___pyx_t_double_complex(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 138, __pyx_L3_error)
4004
- __pyx_v_p2 = __Pyx_PyComplex_As___pyx_t_double_complex(values[2]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 138, __pyx_L3_error)
4005
- __pyx_v_p3 = __Pyx_PyComplex_As___pyx_t_double_complex(values[3]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 138, __pyx_L3_error)
4006
- __pyx_v_n = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_n == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 138, __pyx_L3_error)
4162
+ __pyx_v_p0 = __Pyx_PyComplex_As___pyx_t_double_complex(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 164, __pyx_L3_error)
4163
+ __pyx_v_p1 = __Pyx_PyComplex_As___pyx_t_double_complex(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 164, __pyx_L3_error)
4164
+ __pyx_v_p2 = __Pyx_PyComplex_As___pyx_t_double_complex(values[2]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 164, __pyx_L3_error)
4165
+ __pyx_v_p3 = __Pyx_PyComplex_As___pyx_t_double_complex(values[3]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 164, __pyx_L3_error)
4166
+ __pyx_v_n = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_n == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 164, __pyx_L3_error)
4007
4167
  }
4008
4168
  goto __pyx_L6_skip;
4009
4169
  __pyx_L5_argtuple_error:;
4010
- __Pyx_RaiseArgtupleInvalid("_split_cubic_into_n_gen", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 124, __pyx_L3_error)
4170
+ __Pyx_RaiseArgtupleInvalid("_split_cubic_into_n_gen", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 150, __pyx_L3_error)
4011
4171
  __pyx_L6_skip:;
4012
4172
  goto __pyx_L4_argument_unpacking_done;
4013
4173
  __pyx_L3_error:;
@@ -4040,7 +4200,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu__split_cubic_into_n_gen(CYTHO
4040
4200
  if (unlikely(!__pyx_cur_scope)) {
4041
4201
  __pyx_cur_scope = ((struct __pyx_obj_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen *)Py_None);
4042
4202
  __Pyx_INCREF(Py_None);
4043
- __PYX_ERR(0, 124, __pyx_L1_error)
4203
+ __PYX_ERR(0, 150, __pyx_L1_error)
4044
4204
  } else {
4045
4205
  __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
4046
4206
  }
@@ -4050,7 +4210,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu__split_cubic_into_n_gen(CYTHO
4050
4210
  __pyx_cur_scope->__pyx_v_p3 = __pyx_v_p3;
4051
4211
  __pyx_cur_scope->__pyx_v_n = __pyx_v_n;
4052
4212
  {
4053
- __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_split_cubic_into_n_gen, __pyx_mstate_global->__pyx_n_u_split_cubic_into_n_gen, __pyx_mstate_global->__pyx_n_u_fontTools_cu2qu_cu2qu); if (unlikely(!gen)) __PYX_ERR(0, 124, __pyx_L1_error)
4213
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_split_cubic_into_n_gen, __pyx_mstate_global->__pyx_n_u_split_cubic_into_n_gen, __pyx_mstate_global->__pyx_n_u_fontTools_cu2qu_cu2qu); if (unlikely(!gen)) __PYX_ERR(0, 150, __pyx_L1_error)
4054
4214
  __Pyx_DECREF(__pyx_cur_scope);
4055
4215
  __Pyx_RefNannyFinishContext();
4056
4216
  return (PyObject *) gen;
@@ -4099,17 +4259,17 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
4099
4259
  __pyx_L3_first_run:;
4100
4260
  if (unlikely(__pyx_sent_value != Py_None)) {
4101
4261
  if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator");
4102
- __PYX_ERR(0, 124, __pyx_L1_error)
4262
+ __PYX_ERR(0, 150, __pyx_L1_error)
4103
4263
  }
4104
4264
 
4105
- /* "fontTools/cu2qu/cu2qu.py":139
4265
+ /* "fontTools/cu2qu/cu2qu.py":165
4106
4266
  * )
4107
4267
  * def _split_cubic_into_n_gen(p0, p1, p2, p3, n):
4108
4268
  * a, b, c, d = calc_cubic_parameters(p0, p1, p2, p3) # <<<<<<<<<<<<<<
4109
4269
  * dt = 1 / n
4110
4270
  * delta_2 = dt * dt
4111
4271
  */
4112
- __pyx_t_1 = __pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_parameters(__pyx_cur_scope->__pyx_v_p0, __pyx_cur_scope->__pyx_v_p1, __pyx_cur_scope->__pyx_v_p2, __pyx_cur_scope->__pyx_v_p3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error)
4272
+ __pyx_t_1 = __pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_parameters(__pyx_cur_scope->__pyx_v_p0, __pyx_cur_scope->__pyx_v_p1, __pyx_cur_scope->__pyx_v_p2, __pyx_cur_scope->__pyx_v_p3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error)
4113
4273
  __Pyx_GOTREF(__pyx_t_1);
4114
4274
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
4115
4275
  PyObject* sequence = __pyx_t_1;
@@ -4117,7 +4277,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
4117
4277
  if (unlikely(size != 4)) {
4118
4278
  if (size > 4) __Pyx_RaiseTooManyValuesError(4);
4119
4279
  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
4120
- __PYX_ERR(0, 139, __pyx_L1_error)
4280
+ __PYX_ERR(0, 165, __pyx_L1_error)
4121
4281
  }
4122
4282
  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4123
4283
  if (likely(PyTuple_CheckExact(sequence))) {
@@ -4131,16 +4291,16 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
4131
4291
  __Pyx_INCREF(__pyx_t_5);
4132
4292
  } else {
4133
4293
  __pyx_t_2 = __Pyx_PyList_GetItemRef(sequence, 0);
4134
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error)
4294
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error)
4135
4295
  __Pyx_XGOTREF(__pyx_t_2);
4136
4296
  __pyx_t_3 = __Pyx_PyList_GetItemRef(sequence, 1);
4137
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error)
4297
+ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error)
4138
4298
  __Pyx_XGOTREF(__pyx_t_3);
4139
4299
  __pyx_t_4 = __Pyx_PyList_GetItemRef(sequence, 2);
4140
- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error)
4300
+ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
4141
4301
  __Pyx_XGOTREF(__pyx_t_4);
4142
4302
  __pyx_t_5 = __Pyx_PyList_GetItemRef(sequence, 3);
4143
- if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 139, __pyx_L1_error)
4303
+ if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 165, __pyx_L1_error)
4144
4304
  __Pyx_XGOTREF(__pyx_t_5);
4145
4305
  }
4146
4306
  #else
@@ -4148,7 +4308,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
4148
4308
  Py_ssize_t i;
4149
4309
  PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5};
4150
4310
  for (i=0; i < 4; i++) {
4151
- PyObject* item = __Pyx_PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 139, __pyx_L1_error)
4311
+ PyObject* item = __Pyx_PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 165, __pyx_L1_error)
4152
4312
  __Pyx_GOTREF(item);
4153
4313
  *(temps[i]) = item;
4154
4314
  }
@@ -4158,7 +4318,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
4158
4318
  } else {
4159
4319
  Py_ssize_t index = -1;
4160
4320
  PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5};
4161
- __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error)
4321
+ __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 165, __pyx_L1_error)
4162
4322
  __Pyx_GOTREF(__pyx_t_6);
4163
4323
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4164
4324
  __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
@@ -4167,7 +4327,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
4167
4327
  __Pyx_GOTREF(item);
4168
4328
  *(temps[index]) = item;
4169
4329
  }
4170
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 4) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
4330
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 4) < 0) __PYX_ERR(0, 165, __pyx_L1_error)
4171
4331
  __pyx_t_7 = NULL;
4172
4332
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4173
4333
  goto __pyx_L5_unpacking_done;
@@ -4175,23 +4335,23 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
4175
4335
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4176
4336
  __pyx_t_7 = NULL;
4177
4337
  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
4178
- __PYX_ERR(0, 139, __pyx_L1_error)
4338
+ __PYX_ERR(0, 165, __pyx_L1_error)
4179
4339
  __pyx_L5_unpacking_done:;
4180
4340
  }
4181
- __pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L1_error)
4341
+ __pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 165, __pyx_L1_error)
4182
4342
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4183
- __pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L1_error)
4343
+ __pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 165, __pyx_L1_error)
4184
4344
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4185
- __pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L1_error)
4345
+ __pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 165, __pyx_L1_error)
4186
4346
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4187
- __pyx_t_11 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L1_error)
4347
+ __pyx_t_11 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 165, __pyx_L1_error)
4188
4348
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4189
4349
  __pyx_cur_scope->__pyx_v_a = __pyx_t_8;
4190
4350
  __pyx_cur_scope->__pyx_v_b = __pyx_t_9;
4191
4351
  __pyx_cur_scope->__pyx_v_c = __pyx_t_10;
4192
4352
  __pyx_cur_scope->__pyx_v_d = __pyx_t_11;
4193
4353
 
4194
- /* "fontTools/cu2qu/cu2qu.py":140
4354
+ /* "fontTools/cu2qu/cu2qu.py":166
4195
4355
  * def _split_cubic_into_n_gen(p0, p1, p2, p3, n):
4196
4356
  * a, b, c, d = calc_cubic_parameters(p0, p1, p2, p3)
4197
4357
  * dt = 1 / n # <<<<<<<<<<<<<<
@@ -4200,11 +4360,11 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
4200
4360
  */
4201
4361
  if (unlikely(__pyx_cur_scope->__pyx_v_n == 0)) {
4202
4362
  PyErr_SetString(PyExc_ZeroDivisionError, "float division");
4203
- __PYX_ERR(0, 140, __pyx_L1_error)
4363
+ __PYX_ERR(0, 166, __pyx_L1_error)
4204
4364
  }
4205
4365
  __pyx_cur_scope->__pyx_v_dt = (1.0 / ((double)__pyx_cur_scope->__pyx_v_n));
4206
4366
 
4207
- /* "fontTools/cu2qu/cu2qu.py":141
4367
+ /* "fontTools/cu2qu/cu2qu.py":167
4208
4368
  * a, b, c, d = calc_cubic_parameters(p0, p1, p2, p3)
4209
4369
  * dt = 1 / n
4210
4370
  * delta_2 = dt * dt # <<<<<<<<<<<<<<
@@ -4213,7 +4373,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
4213
4373
  */
4214
4374
  __pyx_cur_scope->__pyx_v_delta_2 = (__pyx_cur_scope->__pyx_v_dt * __pyx_cur_scope->__pyx_v_dt);
4215
4375
 
4216
- /* "fontTools/cu2qu/cu2qu.py":142
4376
+ /* "fontTools/cu2qu/cu2qu.py":168
4217
4377
  * dt = 1 / n
4218
4378
  * delta_2 = dt * dt
4219
4379
  * delta_3 = dt * delta_2 # <<<<<<<<<<<<<<
@@ -4222,7 +4382,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
4222
4382
  */
4223
4383
  __pyx_cur_scope->__pyx_v_delta_3 = (__pyx_cur_scope->__pyx_v_dt * __pyx_cur_scope->__pyx_v_delta_2);
4224
4384
 
4225
- /* "fontTools/cu2qu/cu2qu.py":143
4385
+ /* "fontTools/cu2qu/cu2qu.py":169
4226
4386
  * delta_2 = dt * dt
4227
4387
  * delta_3 = dt * delta_2
4228
4388
  * for i in range(n): # <<<<<<<<<<<<<<
@@ -4234,7 +4394,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
4234
4394
  for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) {
4235
4395
  __pyx_cur_scope->__pyx_v_i = __pyx_t_14;
4236
4396
 
4237
- /* "fontTools/cu2qu/cu2qu.py":144
4397
+ /* "fontTools/cu2qu/cu2qu.py":170
4238
4398
  * delta_3 = dt * delta_2
4239
4399
  * for i in range(n):
4240
4400
  * t1 = i * dt # <<<<<<<<<<<<<<
@@ -4243,7 +4403,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
4243
4403
  */
4244
4404
  __pyx_cur_scope->__pyx_v_t1 = (__pyx_cur_scope->__pyx_v_i * __pyx_cur_scope->__pyx_v_dt);
4245
4405
 
4246
- /* "fontTools/cu2qu/cu2qu.py":145
4406
+ /* "fontTools/cu2qu/cu2qu.py":171
4247
4407
  * for i in range(n):
4248
4408
  * t1 = i * dt
4249
4409
  * t1_2 = t1 * t1 # <<<<<<<<<<<<<<
@@ -4252,7 +4412,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
4252
4412
  */
4253
4413
  __pyx_cur_scope->__pyx_v_t1_2 = (__pyx_cur_scope->__pyx_v_t1 * __pyx_cur_scope->__pyx_v_t1);
4254
4414
 
4255
- /* "fontTools/cu2qu/cu2qu.py":147
4415
+ /* "fontTools/cu2qu/cu2qu.py":173
4256
4416
  * t1_2 = t1 * t1
4257
4417
  * # calc new a, b, c and d
4258
4418
  * a1 = a * delta_3 # <<<<<<<<<<<<<<
@@ -4261,7 +4421,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
4261
4421
  */
4262
4422
  __pyx_cur_scope->__pyx_v_a1 = __Pyx_c_prod_double(__pyx_cur_scope->__pyx_v_a, __pyx_t_double_complex_from_parts(__pyx_cur_scope->__pyx_v_delta_3, 0));
4263
4423
 
4264
- /* "fontTools/cu2qu/cu2qu.py":148
4424
+ /* "fontTools/cu2qu/cu2qu.py":174
4265
4425
  * # calc new a, b, c and d
4266
4426
  * a1 = a * delta_3
4267
4427
  * b1 = (3 * a * t1 + b) * delta_2 # <<<<<<<<<<<<<<
@@ -4270,7 +4430,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
4270
4430
  */
4271
4431
  __pyx_cur_scope->__pyx_v_b1 = __Pyx_c_prod_double(__Pyx_c_sum_double(__Pyx_c_prod_double(__Pyx_c_prod_double(__pyx_t_double_complex_from_parts(3, 0), __pyx_cur_scope->__pyx_v_a), __pyx_t_double_complex_from_parts(__pyx_cur_scope->__pyx_v_t1, 0)), __pyx_cur_scope->__pyx_v_b), __pyx_t_double_complex_from_parts(__pyx_cur_scope->__pyx_v_delta_2, 0));
4272
4432
 
4273
- /* "fontTools/cu2qu/cu2qu.py":149
4433
+ /* "fontTools/cu2qu/cu2qu.py":175
4274
4434
  * a1 = a * delta_3
4275
4435
  * b1 = (3 * a * t1 + b) * delta_2
4276
4436
  * c1 = (2 * b * t1 + c + 3 * a * t1_2) * dt # <<<<<<<<<<<<<<
@@ -4279,7 +4439,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
4279
4439
  */
4280
4440
  __pyx_cur_scope->__pyx_v_c1 = __Pyx_c_prod_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_prod_double(__Pyx_c_prod_double(__pyx_t_double_complex_from_parts(2, 0), __pyx_cur_scope->__pyx_v_b), __pyx_t_double_complex_from_parts(__pyx_cur_scope->__pyx_v_t1, 0)), __pyx_cur_scope->__pyx_v_c), __Pyx_c_prod_double(__Pyx_c_prod_double(__pyx_t_double_complex_from_parts(3, 0), __pyx_cur_scope->__pyx_v_a), __pyx_t_double_complex_from_parts(__pyx_cur_scope->__pyx_v_t1_2, 0))), __pyx_t_double_complex_from_parts(__pyx_cur_scope->__pyx_v_dt, 0));
4281
4441
 
4282
- /* "fontTools/cu2qu/cu2qu.py":150
4442
+ /* "fontTools/cu2qu/cu2qu.py":176
4283
4443
  * b1 = (3 * a * t1 + b) * delta_2
4284
4444
  * c1 = (2 * b * t1 + c + 3 * a * t1_2) * dt
4285
4445
  * d1 = a * t1 * t1_2 + b * t1_2 + c * t1 + d # <<<<<<<<<<<<<<
@@ -4288,14 +4448,14 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
4288
4448
  */
4289
4449
  __pyx_cur_scope->__pyx_v_d1 = __Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_prod_double(__Pyx_c_prod_double(__pyx_cur_scope->__pyx_v_a, __pyx_t_double_complex_from_parts(__pyx_cur_scope->__pyx_v_t1, 0)), __pyx_t_double_complex_from_parts(__pyx_cur_scope->__pyx_v_t1_2, 0)), __Pyx_c_prod_double(__pyx_cur_scope->__pyx_v_b, __pyx_t_double_complex_from_parts(__pyx_cur_scope->__pyx_v_t1_2, 0))), __Pyx_c_prod_double(__pyx_cur_scope->__pyx_v_c, __pyx_t_double_complex_from_parts(__pyx_cur_scope->__pyx_v_t1, 0))), __pyx_cur_scope->__pyx_v_d);
4290
4450
 
4291
- /* "fontTools/cu2qu/cu2qu.py":151
4451
+ /* "fontTools/cu2qu/cu2qu.py":177
4292
4452
  * c1 = (2 * b * t1 + c + 3 * a * t1_2) * dt
4293
4453
  * d1 = a * t1 * t1_2 + b * t1_2 + c * t1 + d
4294
4454
  * yield calc_cubic_points(a1, b1, c1, d1) # <<<<<<<<<<<<<<
4295
4455
  *
4296
4456
  *
4297
4457
  */
4298
- __pyx_t_1 = __pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_points(__pyx_cur_scope->__pyx_v_a1, __pyx_cur_scope->__pyx_v_b1, __pyx_cur_scope->__pyx_v_c1, __pyx_cur_scope->__pyx_v_d1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error)
4458
+ __pyx_t_1 = __pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_points(__pyx_cur_scope->__pyx_v_a1, __pyx_cur_scope->__pyx_v_b1, __pyx_cur_scope->__pyx_v_c1, __pyx_cur_scope->__pyx_v_d1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error)
4299
4459
  __Pyx_GOTREF(__pyx_t_1);
4300
4460
  __pyx_r = __pyx_t_1;
4301
4461
  __pyx_t_1 = 0;
@@ -4312,11 +4472,11 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
4312
4472
  __pyx_t_12 = __pyx_cur_scope->__pyx_t_0;
4313
4473
  __pyx_t_13 = __pyx_cur_scope->__pyx_t_1;
4314
4474
  __pyx_t_14 = __pyx_cur_scope->__pyx_t_2;
4315
- if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 151, __pyx_L1_error)
4475
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 177, __pyx_L1_error)
4316
4476
  }
4317
4477
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
4318
4478
 
4319
- /* "fontTools/cu2qu/cu2qu.py":124
4479
+ /* "fontTools/cu2qu/cu2qu.py":150
4320
4480
  *
4321
4481
  *
4322
4482
  * @cython.locals( # <<<<<<<<<<<<<<
@@ -4349,7 +4509,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
4349
4509
  return __pyx_r;
4350
4510
  }
4351
4511
 
4352
- /* "fontTools/cu2qu/cu2qu.py":154
4512
+ /* "fontTools/cu2qu/cu2qu.py":180
4353
4513
  *
4354
4514
  *
4355
4515
  * @cython.cfunc # <<<<<<<<<<<<<<
@@ -4374,7 +4534,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
4374
4534
  int __pyx_clineno = 0;
4375
4535
  __Pyx_RefNannySetupContext("split_cubic_into_two", 0);
4376
4536
 
4377
- /* "fontTools/cu2qu/cu2qu.py":175
4537
+ /* "fontTools/cu2qu/cu2qu.py":201
4378
4538
  * values).
4379
4539
  * """
4380
4540
  * mid = (p0 + 3 * (p1 + p2) + p3) * 0.125 # <<<<<<<<<<<<<<
@@ -4383,7 +4543,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
4383
4543
  */
4384
4544
  __pyx_v_mid = __Pyx_c_prod_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__pyx_v_p0, __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(3, 0), __Pyx_c_sum_double(__pyx_v_p1, __pyx_v_p2))), __pyx_v_p3), __pyx_t_double_complex_from_parts(0.125, 0));
4385
4545
 
4386
- /* "fontTools/cu2qu/cu2qu.py":176
4546
+ /* "fontTools/cu2qu/cu2qu.py":202
4387
4547
  * """
4388
4548
  * mid = (p0 + 3 * (p1 + p2) + p3) * 0.125
4389
4549
  * deriv3 = (p3 + p2 - p1 - p0) * 0.125 # <<<<<<<<<<<<<<
@@ -4392,7 +4552,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
4392
4552
  */
4393
4553
  __pyx_v_deriv3 = __Pyx_c_prod_double(__Pyx_c_diff_double(__Pyx_c_diff_double(__Pyx_c_sum_double(__pyx_v_p3, __pyx_v_p2), __pyx_v_p1), __pyx_v_p0), __pyx_t_double_complex_from_parts(0.125, 0));
4394
4554
 
4395
- /* "fontTools/cu2qu/cu2qu.py":177
4555
+ /* "fontTools/cu2qu/cu2qu.py":203
4396
4556
  * mid = (p0 + 3 * (p1 + p2) + p3) * 0.125
4397
4557
  * deriv3 = (p3 + p2 - p1 - p0) * 0.125
4398
4558
  * return ( # <<<<<<<<<<<<<<
@@ -4401,90 +4561,90 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
4401
4561
  */
4402
4562
  __Pyx_XDECREF(__pyx_r);
4403
4563
 
4404
- /* "fontTools/cu2qu/cu2qu.py":178
4564
+ /* "fontTools/cu2qu/cu2qu.py":204
4405
4565
  * deriv3 = (p3 + p2 - p1 - p0) * 0.125
4406
4566
  * return (
4407
4567
  * (p0, (p0 + p1) * 0.5, mid - deriv3, mid), # <<<<<<<<<<<<<<
4408
4568
  * (mid, mid + deriv3, (p2 + p3) * 0.5, p3),
4409
4569
  * )
4410
4570
  */
4411
- __pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_p0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error)
4571
+ __pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_p0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error)
4412
4572
  __Pyx_GOTREF(__pyx_t_1);
4413
4573
  __pyx_t_2 = __Pyx_c_prod_double(__Pyx_c_sum_double(__pyx_v_p0, __pyx_v_p1), __pyx_t_double_complex_from_parts(0.5, 0));
4414
- __pyx_t_3 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L1_error)
4574
+ __pyx_t_3 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 204, __pyx_L1_error)
4415
4575
  __Pyx_GOTREF(__pyx_t_3);
4416
4576
  __pyx_t_2 = __Pyx_c_diff_double(__pyx_v_mid, __pyx_v_deriv3);
4417
- __pyx_t_4 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 178, __pyx_L1_error)
4577
+ __pyx_t_4 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 204, __pyx_L1_error)
4418
4578
  __Pyx_GOTREF(__pyx_t_4);
4419
- __pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_v_mid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 178, __pyx_L1_error)
4579
+ __pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_v_mid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 204, __pyx_L1_error)
4420
4580
  __Pyx_GOTREF(__pyx_t_5);
4421
- __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 178, __pyx_L1_error)
4581
+ __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 204, __pyx_L1_error)
4422
4582
  __Pyx_GOTREF(__pyx_t_6);
4423
4583
  __Pyx_GIVEREF(__pyx_t_1);
4424
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 178, __pyx_L1_error);
4584
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 204, __pyx_L1_error);
4425
4585
  __Pyx_GIVEREF(__pyx_t_3);
4426
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 178, __pyx_L1_error);
4586
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 204, __pyx_L1_error);
4427
4587
  __Pyx_GIVEREF(__pyx_t_4);
4428
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4) != (0)) __PYX_ERR(0, 178, __pyx_L1_error);
4588
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4) != (0)) __PYX_ERR(0, 204, __pyx_L1_error);
4429
4589
  __Pyx_GIVEREF(__pyx_t_5);
4430
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5) != (0)) __PYX_ERR(0, 178, __pyx_L1_error);
4590
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5) != (0)) __PYX_ERR(0, 204, __pyx_L1_error);
4431
4591
  __pyx_t_1 = 0;
4432
4592
  __pyx_t_3 = 0;
4433
4593
  __pyx_t_4 = 0;
4434
4594
  __pyx_t_5 = 0;
4435
4595
 
4436
- /* "fontTools/cu2qu/cu2qu.py":179
4596
+ /* "fontTools/cu2qu/cu2qu.py":205
4437
4597
  * return (
4438
4598
  * (p0, (p0 + p1) * 0.5, mid - deriv3, mid),
4439
4599
  * (mid, mid + deriv3, (p2 + p3) * 0.5, p3), # <<<<<<<<<<<<<<
4440
4600
  * )
4441
4601
  *
4442
4602
  */
4443
- __pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_v_mid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 179, __pyx_L1_error)
4603
+ __pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_v_mid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 205, __pyx_L1_error)
4444
4604
  __Pyx_GOTREF(__pyx_t_5);
4445
4605
  __pyx_t_2 = __Pyx_c_sum_double(__pyx_v_mid, __pyx_v_deriv3);
4446
- __pyx_t_4 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 179, __pyx_L1_error)
4606
+ __pyx_t_4 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 205, __pyx_L1_error)
4447
4607
  __Pyx_GOTREF(__pyx_t_4);
4448
4608
  __pyx_t_2 = __Pyx_c_prod_double(__Pyx_c_sum_double(__pyx_v_p2, __pyx_v_p3), __pyx_t_double_complex_from_parts(0.5, 0));
4449
- __pyx_t_3 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error)
4609
+ __pyx_t_3 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 205, __pyx_L1_error)
4450
4610
  __Pyx_GOTREF(__pyx_t_3);
4451
- __pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_p3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error)
4611
+ __pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_p3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error)
4452
4612
  __Pyx_GOTREF(__pyx_t_1);
4453
- __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 179, __pyx_L1_error)
4613
+ __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 205, __pyx_L1_error)
4454
4614
  __Pyx_GOTREF(__pyx_t_7);
4455
4615
  __Pyx_GIVEREF(__pyx_t_5);
4456
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5) != (0)) __PYX_ERR(0, 179, __pyx_L1_error);
4616
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5) != (0)) __PYX_ERR(0, 205, __pyx_L1_error);
4457
4617
  __Pyx_GIVEREF(__pyx_t_4);
4458
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4) != (0)) __PYX_ERR(0, 179, __pyx_L1_error);
4618
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4) != (0)) __PYX_ERR(0, 205, __pyx_L1_error);
4459
4619
  __Pyx_GIVEREF(__pyx_t_3);
4460
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 179, __pyx_L1_error);
4620
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 205, __pyx_L1_error);
4461
4621
  __Pyx_GIVEREF(__pyx_t_1);
4462
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_1) != (0)) __PYX_ERR(0, 179, __pyx_L1_error);
4622
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_1) != (0)) __PYX_ERR(0, 205, __pyx_L1_error);
4463
4623
  __pyx_t_5 = 0;
4464
4624
  __pyx_t_4 = 0;
4465
4625
  __pyx_t_3 = 0;
4466
4626
  __pyx_t_1 = 0;
4467
4627
 
4468
- /* "fontTools/cu2qu/cu2qu.py":178
4628
+ /* "fontTools/cu2qu/cu2qu.py":204
4469
4629
  * deriv3 = (p3 + p2 - p1 - p0) * 0.125
4470
4630
  * return (
4471
4631
  * (p0, (p0 + p1) * 0.5, mid - deriv3, mid), # <<<<<<<<<<<<<<
4472
4632
  * (mid, mid + deriv3, (p2 + p3) * 0.5, p3),
4473
4633
  * )
4474
4634
  */
4475
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error)
4635
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error)
4476
4636
  __Pyx_GOTREF(__pyx_t_1);
4477
4637
  __Pyx_GIVEREF(__pyx_t_6);
4478
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 178, __pyx_L1_error);
4638
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 204, __pyx_L1_error);
4479
4639
  __Pyx_GIVEREF(__pyx_t_7);
4480
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 178, __pyx_L1_error);
4640
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 204, __pyx_L1_error);
4481
4641
  __pyx_t_6 = 0;
4482
4642
  __pyx_t_7 = 0;
4483
4643
  __pyx_r = __pyx_t_1;
4484
4644
  __pyx_t_1 = 0;
4485
4645
  goto __pyx_L0;
4486
4646
 
4487
- /* "fontTools/cu2qu/cu2qu.py":154
4647
+ /* "fontTools/cu2qu/cu2qu.py":180
4488
4648
  *
4489
4649
  *
4490
4650
  * @cython.cfunc # <<<<<<<<<<<<<<
@@ -4508,7 +4668,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
4508
4668
  return __pyx_r;
4509
4669
  }
4510
4670
 
4511
- /* "fontTools/cu2qu/cu2qu.py":183
4671
+ /* "fontTools/cu2qu/cu2qu.py":209
4512
4672
  *
4513
4673
  *
4514
4674
  * @cython.cfunc # <<<<<<<<<<<<<<
@@ -4538,7 +4698,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
4538
4698
  int __pyx_clineno = 0;
4539
4699
  __Pyx_RefNannySetupContext("split_cubic_into_three", 0);
4540
4700
 
4541
- /* "fontTools/cu2qu/cu2qu.py":212
4701
+ /* "fontTools/cu2qu/cu2qu.py":238
4542
4702
  * values).
4543
4703
  * """
4544
4704
  * mid1 = (8 * p0 + 12 * p1 + 6 * p2 + p3) * (1 / 27) # <<<<<<<<<<<<<<
@@ -4547,7 +4707,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
4547
4707
  */
4548
4708
  __pyx_v_mid1 = __Pyx_c_prod_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_prod_double(__pyx_t_double_complex_from_parts(8, 0), __pyx_v_p0), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(12, 0), __pyx_v_p1)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(6, 0), __pyx_v_p2)), __pyx_v_p3), __pyx_t_double_complex_from_parts((1.0 / 27.0), 0));
4549
4709
 
4550
- /* "fontTools/cu2qu/cu2qu.py":213
4710
+ /* "fontTools/cu2qu/cu2qu.py":239
4551
4711
  * """
4552
4712
  * mid1 = (8 * p0 + 12 * p1 + 6 * p2 + p3) * (1 / 27)
4553
4713
  * deriv1 = (p3 + 3 * p2 - 4 * p0) * (1 / 27) # <<<<<<<<<<<<<<
@@ -4556,7 +4716,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
4556
4716
  */
4557
4717
  __pyx_v_deriv1 = __Pyx_c_prod_double(__Pyx_c_diff_double(__Pyx_c_sum_double(__pyx_v_p3, __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(3, 0), __pyx_v_p2)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(4, 0), __pyx_v_p0)), __pyx_t_double_complex_from_parts((1.0 / 27.0), 0));
4558
4718
 
4559
- /* "fontTools/cu2qu/cu2qu.py":214
4719
+ /* "fontTools/cu2qu/cu2qu.py":240
4560
4720
  * mid1 = (8 * p0 + 12 * p1 + 6 * p2 + p3) * (1 / 27)
4561
4721
  * deriv1 = (p3 + 3 * p2 - 4 * p0) * (1 / 27)
4562
4722
  * mid2 = (p0 + 6 * p1 + 12 * p2 + 8 * p3) * (1 / 27) # <<<<<<<<<<<<<<
@@ -4565,7 +4725,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
4565
4725
  */
4566
4726
  __pyx_v_mid2 = __Pyx_c_prod_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__pyx_v_p0, __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(6, 0), __pyx_v_p1)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(12, 0), __pyx_v_p2)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(8, 0), __pyx_v_p3)), __pyx_t_double_complex_from_parts((1.0 / 27.0), 0));
4567
4727
 
4568
- /* "fontTools/cu2qu/cu2qu.py":215
4728
+ /* "fontTools/cu2qu/cu2qu.py":241
4569
4729
  * deriv1 = (p3 + 3 * p2 - 4 * p0) * (1 / 27)
4570
4730
  * mid2 = (p0 + 6 * p1 + 12 * p2 + 8 * p3) * (1 / 27)
4571
4731
  * deriv2 = (4 * p3 - 3 * p1 - p0) * (1 / 27) # <<<<<<<<<<<<<<
@@ -4574,7 +4734,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
4574
4734
  */
4575
4735
  __pyx_v_deriv2 = __Pyx_c_prod_double(__Pyx_c_diff_double(__Pyx_c_diff_double(__Pyx_c_prod_double(__pyx_t_double_complex_from_parts(4, 0), __pyx_v_p3), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(3, 0), __pyx_v_p1)), __pyx_v_p0), __pyx_t_double_complex_from_parts((1.0 / 27.0), 0));
4576
4736
 
4577
- /* "fontTools/cu2qu/cu2qu.py":216
4737
+ /* "fontTools/cu2qu/cu2qu.py":242
4578
4738
  * mid2 = (p0 + 6 * p1 + 12 * p2 + 8 * p3) * (1 / 27)
4579
4739
  * deriv2 = (4 * p3 - 3 * p1 - p0) * (1 / 27)
4580
4740
  * return ( # <<<<<<<<<<<<<<
@@ -4583,129 +4743,129 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
4583
4743
  */
4584
4744
  __Pyx_XDECREF(__pyx_r);
4585
4745
 
4586
- /* "fontTools/cu2qu/cu2qu.py":217
4746
+ /* "fontTools/cu2qu/cu2qu.py":243
4587
4747
  * deriv2 = (4 * p3 - 3 * p1 - p0) * (1 / 27)
4588
4748
  * return (
4589
4749
  * (p0, (2 * p0 + p1) / 3.0, mid1 - deriv1, mid1), # <<<<<<<<<<<<<<
4590
4750
  * (mid1, mid1 + deriv1, mid2 - deriv2, mid2),
4591
4751
  * (mid2, mid2 + deriv2, (p2 + 2 * p3) / 3.0, p3),
4592
4752
  */
4593
- __pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_p0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error)
4753
+ __pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_p0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error)
4594
4754
  __Pyx_GOTREF(__pyx_t_1);
4595
4755
  __pyx_t_2 = __Pyx_c_sum_double(__Pyx_c_prod_double(__pyx_t_double_complex_from_parts(2, 0), __pyx_v_p0), __pyx_v_p1);
4596
4756
  __pyx_t_3 = __pyx_t_double_complex_from_parts(3.0, 0);
4597
4757
  if (unlikely(__Pyx_c_is_zero_double(__pyx_t_3))) {
4598
4758
  PyErr_SetString(PyExc_ZeroDivisionError, "float division");
4599
- __PYX_ERR(0, 217, __pyx_L1_error)
4759
+ __PYX_ERR(0, 243, __pyx_L1_error)
4600
4760
  }
4601
4761
  __pyx_t_4 = __Pyx_c_quot_double(__pyx_t_2, __pyx_t_3);
4602
- __pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 217, __pyx_L1_error)
4762
+ __pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 243, __pyx_L1_error)
4603
4763
  __Pyx_GOTREF(__pyx_t_5);
4604
4764
  __pyx_t_4 = __Pyx_c_diff_double(__pyx_v_mid1, __pyx_v_deriv1);
4605
- __pyx_t_6 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 217, __pyx_L1_error)
4765
+ __pyx_t_6 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 243, __pyx_L1_error)
4606
4766
  __Pyx_GOTREF(__pyx_t_6);
4607
- __pyx_t_7 = __pyx_PyComplex_FromComplex(__pyx_v_mid1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 217, __pyx_L1_error)
4767
+ __pyx_t_7 = __pyx_PyComplex_FromComplex(__pyx_v_mid1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 243, __pyx_L1_error)
4608
4768
  __Pyx_GOTREF(__pyx_t_7);
4609
- __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 217, __pyx_L1_error)
4769
+ __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 243, __pyx_L1_error)
4610
4770
  __Pyx_GOTREF(__pyx_t_8);
4611
4771
  __Pyx_GIVEREF(__pyx_t_1);
4612
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 217, __pyx_L1_error);
4772
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 243, __pyx_L1_error);
4613
4773
  __Pyx_GIVEREF(__pyx_t_5);
4614
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5) != (0)) __PYX_ERR(0, 217, __pyx_L1_error);
4774
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5) != (0)) __PYX_ERR(0, 243, __pyx_L1_error);
4615
4775
  __Pyx_GIVEREF(__pyx_t_6);
4616
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_6) != (0)) __PYX_ERR(0, 217, __pyx_L1_error);
4776
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_6) != (0)) __PYX_ERR(0, 243, __pyx_L1_error);
4617
4777
  __Pyx_GIVEREF(__pyx_t_7);
4618
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_7) != (0)) __PYX_ERR(0, 217, __pyx_L1_error);
4778
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_7) != (0)) __PYX_ERR(0, 243, __pyx_L1_error);
4619
4779
  __pyx_t_1 = 0;
4620
4780
  __pyx_t_5 = 0;
4621
4781
  __pyx_t_6 = 0;
4622
4782
  __pyx_t_7 = 0;
4623
4783
 
4624
- /* "fontTools/cu2qu/cu2qu.py":218
4784
+ /* "fontTools/cu2qu/cu2qu.py":244
4625
4785
  * return (
4626
4786
  * (p0, (2 * p0 + p1) / 3.0, mid1 - deriv1, mid1),
4627
4787
  * (mid1, mid1 + deriv1, mid2 - deriv2, mid2), # <<<<<<<<<<<<<<
4628
4788
  * (mid2, mid2 + deriv2, (p2 + 2 * p3) / 3.0, p3),
4629
4789
  * )
4630
4790
  */
4631
- __pyx_t_7 = __pyx_PyComplex_FromComplex(__pyx_v_mid1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 218, __pyx_L1_error)
4791
+ __pyx_t_7 = __pyx_PyComplex_FromComplex(__pyx_v_mid1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 244, __pyx_L1_error)
4632
4792
  __Pyx_GOTREF(__pyx_t_7);
4633
4793
  __pyx_t_4 = __Pyx_c_sum_double(__pyx_v_mid1, __pyx_v_deriv1);
4634
- __pyx_t_6 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 218, __pyx_L1_error)
4794
+ __pyx_t_6 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L1_error)
4635
4795
  __Pyx_GOTREF(__pyx_t_6);
4636
4796
  __pyx_t_4 = __Pyx_c_diff_double(__pyx_v_mid2, __pyx_v_deriv2);
4637
- __pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 218, __pyx_L1_error)
4797
+ __pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 244, __pyx_L1_error)
4638
4798
  __Pyx_GOTREF(__pyx_t_5);
4639
- __pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_mid2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error)
4799
+ __pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_mid2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
4640
4800
  __Pyx_GOTREF(__pyx_t_1);
4641
- __pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 218, __pyx_L1_error)
4801
+ __pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 244, __pyx_L1_error)
4642
4802
  __Pyx_GOTREF(__pyx_t_9);
4643
4803
  __Pyx_GIVEREF(__pyx_t_7);
4644
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7) != (0)) __PYX_ERR(0, 218, __pyx_L1_error);
4804
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7) != (0)) __PYX_ERR(0, 244, __pyx_L1_error);
4645
4805
  __Pyx_GIVEREF(__pyx_t_6);
4646
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6) != (0)) __PYX_ERR(0, 218, __pyx_L1_error);
4806
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6) != (0)) __PYX_ERR(0, 244, __pyx_L1_error);
4647
4807
  __Pyx_GIVEREF(__pyx_t_5);
4648
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_5) != (0)) __PYX_ERR(0, 218, __pyx_L1_error);
4808
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_5) != (0)) __PYX_ERR(0, 244, __pyx_L1_error);
4649
4809
  __Pyx_GIVEREF(__pyx_t_1);
4650
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_1) != (0)) __PYX_ERR(0, 218, __pyx_L1_error);
4810
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_1) != (0)) __PYX_ERR(0, 244, __pyx_L1_error);
4651
4811
  __pyx_t_7 = 0;
4652
4812
  __pyx_t_6 = 0;
4653
4813
  __pyx_t_5 = 0;
4654
4814
  __pyx_t_1 = 0;
4655
4815
 
4656
- /* "fontTools/cu2qu/cu2qu.py":219
4816
+ /* "fontTools/cu2qu/cu2qu.py":245
4657
4817
  * (p0, (2 * p0 + p1) / 3.0, mid1 - deriv1, mid1),
4658
4818
  * (mid1, mid1 + deriv1, mid2 - deriv2, mid2),
4659
4819
  * (mid2, mid2 + deriv2, (p2 + 2 * p3) / 3.0, p3), # <<<<<<<<<<<<<<
4660
4820
  * )
4661
4821
  *
4662
4822
  */
4663
- __pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_mid2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error)
4823
+ __pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_mid2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error)
4664
4824
  __Pyx_GOTREF(__pyx_t_1);
4665
4825
  __pyx_t_4 = __Pyx_c_sum_double(__pyx_v_mid2, __pyx_v_deriv2);
4666
- __pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 219, __pyx_L1_error)
4826
+ __pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 245, __pyx_L1_error)
4667
4827
  __Pyx_GOTREF(__pyx_t_5);
4668
4828
  __pyx_t_4 = __Pyx_c_sum_double(__pyx_v_p2, __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(2, 0), __pyx_v_p3));
4669
4829
  __pyx_t_3 = __pyx_t_double_complex_from_parts(3.0, 0);
4670
4830
  if (unlikely(__Pyx_c_is_zero_double(__pyx_t_3))) {
4671
4831
  PyErr_SetString(PyExc_ZeroDivisionError, "float division");
4672
- __PYX_ERR(0, 219, __pyx_L1_error)
4832
+ __PYX_ERR(0, 245, __pyx_L1_error)
4673
4833
  }
4674
4834
  __pyx_t_2 = __Pyx_c_quot_double(__pyx_t_4, __pyx_t_3);
4675
- __pyx_t_6 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 219, __pyx_L1_error)
4835
+ __pyx_t_6 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 245, __pyx_L1_error)
4676
4836
  __Pyx_GOTREF(__pyx_t_6);
4677
- __pyx_t_7 = __pyx_PyComplex_FromComplex(__pyx_v_p3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 219, __pyx_L1_error)
4837
+ __pyx_t_7 = __pyx_PyComplex_FromComplex(__pyx_v_p3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 245, __pyx_L1_error)
4678
4838
  __Pyx_GOTREF(__pyx_t_7);
4679
- __pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 219, __pyx_L1_error)
4839
+ __pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 245, __pyx_L1_error)
4680
4840
  __Pyx_GOTREF(__pyx_t_10);
4681
4841
  __Pyx_GIVEREF(__pyx_t_1);
4682
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 219, __pyx_L1_error);
4842
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 245, __pyx_L1_error);
4683
4843
  __Pyx_GIVEREF(__pyx_t_5);
4684
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_5) != (0)) __PYX_ERR(0, 219, __pyx_L1_error);
4844
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_5) != (0)) __PYX_ERR(0, 245, __pyx_L1_error);
4685
4845
  __Pyx_GIVEREF(__pyx_t_6);
4686
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_6) != (0)) __PYX_ERR(0, 219, __pyx_L1_error);
4846
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_6) != (0)) __PYX_ERR(0, 245, __pyx_L1_error);
4687
4847
  __Pyx_GIVEREF(__pyx_t_7);
4688
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_7) != (0)) __PYX_ERR(0, 219, __pyx_L1_error);
4848
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_7) != (0)) __PYX_ERR(0, 245, __pyx_L1_error);
4689
4849
  __pyx_t_1 = 0;
4690
4850
  __pyx_t_5 = 0;
4691
4851
  __pyx_t_6 = 0;
4692
4852
  __pyx_t_7 = 0;
4693
4853
 
4694
- /* "fontTools/cu2qu/cu2qu.py":217
4854
+ /* "fontTools/cu2qu/cu2qu.py":243
4695
4855
  * deriv2 = (4 * p3 - 3 * p1 - p0) * (1 / 27)
4696
4856
  * return (
4697
4857
  * (p0, (2 * p0 + p1) / 3.0, mid1 - deriv1, mid1), # <<<<<<<<<<<<<<
4698
4858
  * (mid1, mid1 + deriv1, mid2 - deriv2, mid2),
4699
4859
  * (mid2, mid2 + deriv2, (p2 + 2 * p3) / 3.0, p3),
4700
4860
  */
4701
- __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 217, __pyx_L1_error)
4861
+ __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 243, __pyx_L1_error)
4702
4862
  __Pyx_GOTREF(__pyx_t_7);
4703
4863
  __Pyx_GIVEREF(__pyx_t_8);
4704
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8) != (0)) __PYX_ERR(0, 217, __pyx_L1_error);
4864
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8) != (0)) __PYX_ERR(0, 243, __pyx_L1_error);
4705
4865
  __Pyx_GIVEREF(__pyx_t_9);
4706
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9) != (0)) __PYX_ERR(0, 217, __pyx_L1_error);
4866
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9) != (0)) __PYX_ERR(0, 243, __pyx_L1_error);
4707
4867
  __Pyx_GIVEREF(__pyx_t_10);
4708
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_10) != (0)) __PYX_ERR(0, 217, __pyx_L1_error);
4868
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_10) != (0)) __PYX_ERR(0, 243, __pyx_L1_error);
4709
4869
  __pyx_t_8 = 0;
4710
4870
  __pyx_t_9 = 0;
4711
4871
  __pyx_t_10 = 0;
@@ -4713,7 +4873,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
4713
4873
  __pyx_t_7 = 0;
4714
4874
  goto __pyx_L0;
4715
4875
 
4716
- /* "fontTools/cu2qu/cu2qu.py":183
4876
+ /* "fontTools/cu2qu/cu2qu.py":209
4717
4877
  *
4718
4878
  *
4719
4879
  * @cython.cfunc # <<<<<<<<<<<<<<
@@ -4738,7 +4898,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
4738
4898
  return __pyx_r;
4739
4899
  }
4740
4900
 
4741
- /* "fontTools/cu2qu/cu2qu.py":223
4901
+ /* "fontTools/cu2qu/cu2qu.py":249
4742
4902
  *
4743
4903
  *
4744
4904
  * @cython.cfunc # <<<<<<<<<<<<<<
@@ -4751,7 +4911,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cub
4751
4911
  __pyx_t_double_complex __pyx_v__p2;
4752
4912
  __pyx_t_double_complex __pyx_r;
4753
4913
 
4754
- /* "fontTools/cu2qu/cu2qu.py":247
4914
+ /* "fontTools/cu2qu/cu2qu.py":273
4755
4915
  * complex: Location of candidate control point on quadratic curve.
4756
4916
  * """
4757
4917
  * _p1 = p0 + (p1 - p0) * 1.5 # <<<<<<<<<<<<<<
@@ -4760,7 +4920,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cub
4760
4920
  */
4761
4921
  __pyx_v__p1 = __Pyx_c_sum_double(__pyx_v_p0, __Pyx_c_prod_double(__Pyx_c_diff_double(__pyx_v_p1, __pyx_v_p0), __pyx_t_double_complex_from_parts(1.5, 0)));
4762
4922
 
4763
- /* "fontTools/cu2qu/cu2qu.py":248
4923
+ /* "fontTools/cu2qu/cu2qu.py":274
4764
4924
  * """
4765
4925
  * _p1 = p0 + (p1 - p0) * 1.5
4766
4926
  * _p2 = p3 + (p2 - p3) * 1.5 # <<<<<<<<<<<<<<
@@ -4769,7 +4929,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cub
4769
4929
  */
4770
4930
  __pyx_v__p2 = __Pyx_c_sum_double(__pyx_v_p3, __Pyx_c_prod_double(__Pyx_c_diff_double(__pyx_v_p2, __pyx_v_p3), __pyx_t_double_complex_from_parts(1.5, 0)));
4771
4931
 
4772
- /* "fontTools/cu2qu/cu2qu.py":249
4932
+ /* "fontTools/cu2qu/cu2qu.py":275
4773
4933
  * _p1 = p0 + (p1 - p0) * 1.5
4774
4934
  * _p2 = p3 + (p2 - p3) * 1.5
4775
4935
  * return _p1 + (_p2 - _p1) * t # <<<<<<<<<<<<<<
@@ -4779,7 +4939,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cub
4779
4939
  __pyx_r = __Pyx_c_sum_double(__pyx_v__p1, __Pyx_c_prod_double(__Pyx_c_diff_double(__pyx_v__p2, __pyx_v__p1), __pyx_t_double_complex_from_parts(__pyx_v_t, 0)));
4780
4940
  goto __pyx_L0;
4781
4941
 
4782
- /* "fontTools/cu2qu/cu2qu.py":223
4942
+ /* "fontTools/cu2qu/cu2qu.py":249
4783
4943
  *
4784
4944
  *
4785
4945
  * @cython.cfunc # <<<<<<<<<<<<<<
@@ -4792,7 +4952,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cub
4792
4952
  return __pyx_r;
4793
4953
  }
4794
4954
 
4795
- /* "fontTools/cu2qu/cu2qu.py":252
4955
+ /* "fontTools/cu2qu/cu2qu.py":278
4796
4956
  *
4797
4957
  *
4798
4958
  * @cython.cfunc # <<<<<<<<<<<<<<
@@ -4816,19 +4976,21 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
4816
4976
  PyObject *__pyx_t_7 = NULL;
4817
4977
  PyObject *__pyx_t_8 = NULL;
4818
4978
  PyObject *__pyx_t_9 = NULL;
4819
- PyObject *__pyx_t_10 = NULL;
4820
- PyObject *__pyx_t_11 = NULL;
4979
+ int __pyx_t_10;
4980
+ int __pyx_t_11;
4821
4981
  PyObject *__pyx_t_12 = NULL;
4822
4982
  PyObject *__pyx_t_13 = NULL;
4823
4983
  PyObject *__pyx_t_14 = NULL;
4824
- size_t __pyx_t_15;
4825
- __pyx_t_double_complex __pyx_t_16;
4984
+ PyObject *__pyx_t_15 = NULL;
4985
+ PyObject *__pyx_t_16 = NULL;
4986
+ size_t __pyx_t_17;
4987
+ __pyx_t_double_complex __pyx_t_18;
4826
4988
  int __pyx_lineno = 0;
4827
4989
  const char *__pyx_filename = NULL;
4828
4990
  int __pyx_clineno = 0;
4829
4991
  __Pyx_RefNannySetupContext("calc_intersect", 0);
4830
4992
 
4831
- /* "fontTools/cu2qu/cu2qu.py":270
4993
+ /* "fontTools/cu2qu/cu2qu.py":296
4832
4994
  * if no intersection was found.
4833
4995
  * """
4834
4996
  * ab = b - a # <<<<<<<<<<<<<<
@@ -4837,7 +4999,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
4837
4999
  */
4838
5000
  __pyx_v_ab = __Pyx_c_diff_double(__pyx_v_b, __pyx_v_a);
4839
5001
 
4840
- /* "fontTools/cu2qu/cu2qu.py":271
5002
+ /* "fontTools/cu2qu/cu2qu.py":297
4841
5003
  * """
4842
5004
  * ab = b - a
4843
5005
  * cd = d - c # <<<<<<<<<<<<<<
@@ -4846,7 +5008,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
4846
5008
  */
4847
5009
  __pyx_v_cd = __Pyx_c_diff_double(__pyx_v_d, __pyx_v_c);
4848
5010
 
4849
- /* "fontTools/cu2qu/cu2qu.py":272
5011
+ /* "fontTools/cu2qu/cu2qu.py":298
4850
5012
  * ab = b - a
4851
5013
  * cd = d - c
4852
5014
  * p = ab * 1j # <<<<<<<<<<<<<<
@@ -4855,7 +5017,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
4855
5017
  */
4856
5018
  __pyx_v_p = __Pyx_c_prod_double(__pyx_v_ab, __pyx_t_double_complex_from_parts(0, 1.0));
4857
5019
 
4858
- /* "fontTools/cu2qu/cu2qu.py":273
5020
+ /* "fontTools/cu2qu/cu2qu.py":299
4859
5021
  * cd = d - c
4860
5022
  * p = ab * 1j
4861
5023
  * try: # <<<<<<<<<<<<<<
@@ -4871,22 +5033,22 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
4871
5033
  __Pyx_XGOTREF(__pyx_t_3);
4872
5034
  /*try:*/ {
4873
5035
 
4874
- /* "fontTools/cu2qu/cu2qu.py":274
5036
+ /* "fontTools/cu2qu/cu2qu.py":300
4875
5037
  * p = ab * 1j
4876
5038
  * try:
4877
5039
  * h = dot(p, a - c) / dot(p, cd) # <<<<<<<<<<<<<<
4878
5040
  * except ZeroDivisionError:
4879
- * return complex(NAN, NAN)
5041
+ * # if 3 or 4 points are equal, we do have an intersection despite the zero-div:
4880
5042
  */
4881
- __pyx_t_4 = __pyx_f_9fontTools_5cu2qu_5cu2qu_dot(__pyx_v_p, __Pyx_c_diff_double(__pyx_v_a, __pyx_v_c)); if (unlikely(__pyx_t_4 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 274, __pyx_L3_error)
4882
- __pyx_t_5 = __pyx_f_9fontTools_5cu2qu_5cu2qu_dot(__pyx_v_p, __pyx_v_cd); if (unlikely(__pyx_t_5 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 274, __pyx_L3_error)
5043
+ __pyx_t_4 = __pyx_f_9fontTools_5cu2qu_5cu2qu_dot(__pyx_v_p, __Pyx_c_diff_double(__pyx_v_a, __pyx_v_c)); if (unlikely(__pyx_t_4 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 300, __pyx_L3_error)
5044
+ __pyx_t_5 = __pyx_f_9fontTools_5cu2qu_5cu2qu_dot(__pyx_v_p, __pyx_v_cd); if (unlikely(__pyx_t_5 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 300, __pyx_L3_error)
4883
5045
  if (unlikely(__pyx_t_5 == 0)) {
4884
5046
  PyErr_SetString(PyExc_ZeroDivisionError, "float division");
4885
- __PYX_ERR(0, 274, __pyx_L3_error)
5047
+ __PYX_ERR(0, 300, __pyx_L3_error)
4886
5048
  }
4887
5049
  __pyx_v_h = (__pyx_t_4 / __pyx_t_5);
4888
5050
 
4889
- /* "fontTools/cu2qu/cu2qu.py":273
5051
+ /* "fontTools/cu2qu/cu2qu.py":299
4890
5052
  * cd = d - c
4891
5053
  * p = ab * 1j
4892
5054
  * try: # <<<<<<<<<<<<<<
@@ -4900,49 +5062,95 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
4900
5062
  goto __pyx_L8_try_end;
4901
5063
  __pyx_L3_error:;
4902
5064
 
4903
- /* "fontTools/cu2qu/cu2qu.py":275
5065
+ /* "fontTools/cu2qu/cu2qu.py":301
4904
5066
  * try:
4905
5067
  * h = dot(p, a - c) / dot(p, cd)
4906
5068
  * except ZeroDivisionError: # <<<<<<<<<<<<<<
4907
- * return complex(NAN, NAN)
4908
- * return c + cd * h
5069
+ * # if 3 or 4 points are equal, we do have an intersection despite the zero-div:
5070
+ * # return one of the off-curves so that the algorithm can attempt a one-curve
4909
5071
  */
4910
5072
  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ZeroDivisionError);
4911
5073
  if (__pyx_t_6) {
4912
5074
  __Pyx_AddTraceback("fontTools.cu2qu.cu2qu.calc_intersect", __pyx_clineno, __pyx_lineno, __pyx_filename);
4913
- if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 275, __pyx_L5_except_error)
5075
+ if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 301, __pyx_L5_except_error)
4914
5076
  __Pyx_XGOTREF(__pyx_t_7);
4915
5077
  __Pyx_XGOTREF(__pyx_t_8);
4916
5078
  __Pyx_XGOTREF(__pyx_t_9);
4917
5079
 
4918
- /* "fontTools/cu2qu/cu2qu.py":276
4919
- * h = dot(p, a - c) / dot(p, cd)
4920
- * except ZeroDivisionError:
5080
+ /* "fontTools/cu2qu/cu2qu.py":306
5081
+ * # solution if it's within tolerance:
5082
+ * # https://github.com/linebender/kurbo/pull/484
5083
+ * if b == c and (a == b or c == d): # <<<<<<<<<<<<<<
5084
+ * return b
5085
+ * return complex(NAN, NAN)
5086
+ */
5087
+ __pyx_t_11 = (__Pyx_c_eq_double(__pyx_v_b, __pyx_v_c));
5088
+ if (__pyx_t_11) {
5089
+ } else {
5090
+ __pyx_t_10 = __pyx_t_11;
5091
+ goto __pyx_L12_bool_binop_done;
5092
+ }
5093
+ __pyx_t_11 = (__Pyx_c_eq_double(__pyx_v_a, __pyx_v_b));
5094
+ if (!__pyx_t_11) {
5095
+ } else {
5096
+ __pyx_t_10 = __pyx_t_11;
5097
+ goto __pyx_L12_bool_binop_done;
5098
+ }
5099
+ __pyx_t_11 = (__Pyx_c_eq_double(__pyx_v_c, __pyx_v_d));
5100
+ __pyx_t_10 = __pyx_t_11;
5101
+ __pyx_L12_bool_binop_done:;
5102
+ if (__pyx_t_10) {
5103
+
5104
+ /* "fontTools/cu2qu/cu2qu.py":307
5105
+ * # https://github.com/linebender/kurbo/pull/484
5106
+ * if b == c and (a == b or c == d):
5107
+ * return b # <<<<<<<<<<<<<<
5108
+ * return complex(NAN, NAN)
5109
+ * return c + cd * h
5110
+ */
5111
+ __pyx_r = __pyx_v_b;
5112
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5113
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5114
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
5115
+ goto __pyx_L6_except_return;
5116
+
5117
+ /* "fontTools/cu2qu/cu2qu.py":306
5118
+ * # solution if it's within tolerance:
5119
+ * # https://github.com/linebender/kurbo/pull/484
5120
+ * if b == c and (a == b or c == d): # <<<<<<<<<<<<<<
5121
+ * return b
5122
+ * return complex(NAN, NAN)
5123
+ */
5124
+ }
5125
+
5126
+ /* "fontTools/cu2qu/cu2qu.py":308
5127
+ * if b == c and (a == b or c == d):
5128
+ * return b
4921
5129
  * return complex(NAN, NAN) # <<<<<<<<<<<<<<
4922
5130
  * return c + cd * h
4923
5131
  *
4924
5132
  */
4925
- __pyx_t_11 = NULL;
5133
+ __pyx_t_13 = NULL;
4926
5134
  __Pyx_INCREF((PyObject *)(&PyComplex_Type));
4927
- __pyx_t_12 = ((PyObject *)(&PyComplex_Type));
4928
- __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_NAN); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 276, __pyx_L5_except_error)
4929
- __Pyx_GOTREF(__pyx_t_13);
4930
- __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_NAN); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 276, __pyx_L5_except_error)
4931
- __Pyx_GOTREF(__pyx_t_14);
4932
- __pyx_t_15 = 1;
5135
+ __pyx_t_14 = ((PyObject *)(&PyComplex_Type));
5136
+ __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_NAN); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 308, __pyx_L5_except_error)
5137
+ __Pyx_GOTREF(__pyx_t_15);
5138
+ __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_NAN); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 308, __pyx_L5_except_error)
5139
+ __Pyx_GOTREF(__pyx_t_16);
5140
+ __pyx_t_17 = 1;
4933
5141
  {
4934
- PyObject *__pyx_callargs[3] = {__pyx_t_11, __pyx_t_13, __pyx_t_14};
4935
- __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+__pyx_t_15, (3-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
4936
- __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
4937
- __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
5142
+ PyObject *__pyx_callargs[3] = {__pyx_t_13, __pyx_t_15, __pyx_t_16};
5143
+ __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+__pyx_t_17, (3-__pyx_t_17) | (__pyx_t_17*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
5144
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
5145
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
5146
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
4938
5147
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
4939
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
4940
- if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 276, __pyx_L5_except_error)
4941
- __Pyx_GOTREF(__pyx_t_10);
5148
+ if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 308, __pyx_L5_except_error)
5149
+ __Pyx_GOTREF(__pyx_t_12);
4942
5150
  }
4943
- __pyx_t_16 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L5_except_error)
4944
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
4945
- __pyx_r = __pyx_t_16;
5151
+ __pyx_t_18 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_12); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 308, __pyx_L5_except_error)
5152
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
5153
+ __pyx_r = __pyx_t_18;
4946
5154
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4947
5155
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
4948
5156
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
@@ -4950,7 +5158,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
4950
5158
  }
4951
5159
  goto __pyx_L5_except_error;
4952
5160
 
4953
- /* "fontTools/cu2qu/cu2qu.py":273
5161
+ /* "fontTools/cu2qu/cu2qu.py":299
4954
5162
  * cd = d - c
4955
5163
  * p = ab * 1j
4956
5164
  * try: # <<<<<<<<<<<<<<
@@ -4972,8 +5180,8 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
4972
5180
  __pyx_L8_try_end:;
4973
5181
  }
4974
5182
 
4975
- /* "fontTools/cu2qu/cu2qu.py":277
4976
- * except ZeroDivisionError:
5183
+ /* "fontTools/cu2qu/cu2qu.py":309
5184
+ * return b
4977
5185
  * return complex(NAN, NAN)
4978
5186
  * return c + cd * h # <<<<<<<<<<<<<<
4979
5187
  *
@@ -4982,7 +5190,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
4982
5190
  __pyx_r = __Pyx_c_sum_double(__pyx_v_c, __Pyx_c_prod_double(__pyx_v_cd, __pyx_t_double_complex_from_parts(__pyx_v_h, 0)));
4983
5191
  goto __pyx_L0;
4984
5192
 
4985
- /* "fontTools/cu2qu/cu2qu.py":252
5193
+ /* "fontTools/cu2qu/cu2qu.py":278
4986
5194
  *
4987
5195
  *
4988
5196
  * @cython.cfunc # <<<<<<<<<<<<<<
@@ -4995,11 +5203,11 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
4995
5203
  __Pyx_XDECREF(__pyx_t_7);
4996
5204
  __Pyx_XDECREF(__pyx_t_8);
4997
5205
  __Pyx_XDECREF(__pyx_t_9);
4998
- __Pyx_XDECREF(__pyx_t_10);
4999
- __Pyx_XDECREF(__pyx_t_11);
5000
5206
  __Pyx_XDECREF(__pyx_t_12);
5001
5207
  __Pyx_XDECREF(__pyx_t_13);
5002
5208
  __Pyx_XDECREF(__pyx_t_14);
5209
+ __Pyx_XDECREF(__pyx_t_15);
5210
+ __Pyx_XDECREF(__pyx_t_16);
5003
5211
  __Pyx_AddTraceback("fontTools.cu2qu.cu2qu.calc_intersect", __pyx_clineno, __pyx_lineno, __pyx_filename);
5004
5212
  __pyx_r = __pyx_t_double_complex_from_parts(0, 0);
5005
5213
  __pyx_L0:;
@@ -5007,7 +5215,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
5007
5215
  return __pyx_r;
5008
5216
  }
5009
5217
 
5010
- /* "fontTools/cu2qu/cu2qu.py":280
5218
+ /* "fontTools/cu2qu/cu2qu.py":312
5011
5219
  *
5012
5220
  *
5013
5221
  * @cython.cfunc # <<<<<<<<<<<<<<
@@ -5027,7 +5235,7 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
5027
5235
  const char *__pyx_filename = NULL;
5028
5236
  int __pyx_clineno = 0;
5029
5237
 
5030
- /* "fontTools/cu2qu/cu2qu.py":309
5238
+ /* "fontTools/cu2qu/cu2qu.py":341
5031
5239
  * """
5032
5240
  * # First check p2 then p1, as p2 has higher error early on.
5033
5241
  * if abs(p2) <= tolerance and abs(p1) <= tolerance: # <<<<<<<<<<<<<<
@@ -5045,7 +5253,7 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
5045
5253
  __pyx_L4_bool_binop_done:;
5046
5254
  if (__pyx_t_1) {
5047
5255
 
5048
- /* "fontTools/cu2qu/cu2qu.py":310
5256
+ /* "fontTools/cu2qu/cu2qu.py":342
5049
5257
  * # First check p2 then p1, as p2 has higher error early on.
5050
5258
  * if abs(p2) <= tolerance and abs(p1) <= tolerance:
5051
5259
  * return True # <<<<<<<<<<<<<<
@@ -5055,7 +5263,7 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
5055
5263
  __pyx_r = 1;
5056
5264
  goto __pyx_L0;
5057
5265
 
5058
- /* "fontTools/cu2qu/cu2qu.py":309
5266
+ /* "fontTools/cu2qu/cu2qu.py":341
5059
5267
  * """
5060
5268
  * # First check p2 then p1, as p2 has higher error early on.
5061
5269
  * if abs(p2) <= tolerance and abs(p1) <= tolerance: # <<<<<<<<<<<<<<
@@ -5064,7 +5272,7 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
5064
5272
  */
5065
5273
  }
5066
5274
 
5067
- /* "fontTools/cu2qu/cu2qu.py":313
5275
+ /* "fontTools/cu2qu/cu2qu.py":345
5068
5276
  *
5069
5277
  * # Split.
5070
5278
  * mid = (p0 + 3 * (p1 + p2) + p3) * 0.125 # <<<<<<<<<<<<<<
@@ -5073,7 +5281,7 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
5073
5281
  */
5074
5282
  __pyx_v_mid = __Pyx_c_prod_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__pyx_v_p0, __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(3, 0), __Pyx_c_sum_double(__pyx_v_p1, __pyx_v_p2))), __pyx_v_p3), __pyx_t_double_complex_from_parts(0.125, 0));
5075
5283
 
5076
- /* "fontTools/cu2qu/cu2qu.py":314
5284
+ /* "fontTools/cu2qu/cu2qu.py":346
5077
5285
  * # Split.
5078
5286
  * mid = (p0 + 3 * (p1 + p2) + p3) * 0.125
5079
5287
  * if abs(mid) > tolerance: # <<<<<<<<<<<<<<
@@ -5083,7 +5291,7 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
5083
5291
  __pyx_t_1 = (__Pyx_c_abs_double(__pyx_v_mid) > __pyx_v_tolerance);
5084
5292
  if (__pyx_t_1) {
5085
5293
 
5086
- /* "fontTools/cu2qu/cu2qu.py":315
5294
+ /* "fontTools/cu2qu/cu2qu.py":347
5087
5295
  * mid = (p0 + 3 * (p1 + p2) + p3) * 0.125
5088
5296
  * if abs(mid) > tolerance:
5089
5297
  * return False # <<<<<<<<<<<<<<
@@ -5093,7 +5301,7 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
5093
5301
  __pyx_r = 0;
5094
5302
  goto __pyx_L0;
5095
5303
 
5096
- /* "fontTools/cu2qu/cu2qu.py":314
5304
+ /* "fontTools/cu2qu/cu2qu.py":346
5097
5305
  * # Split.
5098
5306
  * mid = (p0 + 3 * (p1 + p2) + p3) * 0.125
5099
5307
  * if abs(mid) > tolerance: # <<<<<<<<<<<<<<
@@ -5102,7 +5310,7 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
5102
5310
  */
5103
5311
  }
5104
5312
 
5105
- /* "fontTools/cu2qu/cu2qu.py":316
5313
+ /* "fontTools/cu2qu/cu2qu.py":348
5106
5314
  * if abs(mid) > tolerance:
5107
5315
  * return False
5108
5316
  * deriv3 = (p3 + p2 - p1 - p0) * 0.125 # <<<<<<<<<<<<<<
@@ -5111,34 +5319,34 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
5111
5319
  */
5112
5320
  __pyx_v_deriv3 = __Pyx_c_prod_double(__Pyx_c_diff_double(__Pyx_c_diff_double(__Pyx_c_sum_double(__pyx_v_p3, __pyx_v_p2), __pyx_v_p1), __pyx_v_p0), __pyx_t_double_complex_from_parts(0.125, 0));
5113
5321
 
5114
- /* "fontTools/cu2qu/cu2qu.py":317
5322
+ /* "fontTools/cu2qu/cu2qu.py":349
5115
5323
  * return False
5116
5324
  * deriv3 = (p3 + p2 - p1 - p0) * 0.125
5117
5325
  * return cubic_farthest_fit_inside( # <<<<<<<<<<<<<<
5118
5326
  * p0, (p0 + p1) * 0.5, mid - deriv3, mid, tolerance
5119
5327
  * ) and cubic_farthest_fit_inside(mid, mid + deriv3, (p2 + p3) * 0.5, p3, tolerance)
5120
5328
  */
5121
- __pyx_t_4 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_v_p0, __Pyx_c_prod_double(__Pyx_c_sum_double(__pyx_v_p0, __pyx_v_p1), __pyx_t_double_complex_from_parts(0.5, 0)), __Pyx_c_diff_double(__pyx_v_mid, __pyx_v_deriv3), __pyx_v_mid, __pyx_v_tolerance); if (unlikely(__pyx_t_4 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 317, __pyx_L1_error)
5329
+ __pyx_t_4 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_v_p0, __Pyx_c_prod_double(__Pyx_c_sum_double(__pyx_v_p0, __pyx_v_p1), __pyx_t_double_complex_from_parts(0.5, 0)), __Pyx_c_diff_double(__pyx_v_mid, __pyx_v_deriv3), __pyx_v_mid, __pyx_v_tolerance); if (unlikely(__pyx_t_4 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 349, __pyx_L1_error)
5122
5330
  if (__pyx_t_4) {
5123
5331
  } else {
5124
5332
  __pyx_t_3 = __pyx_t_4;
5125
5333
  goto __pyx_L7_bool_binop_done;
5126
5334
  }
5127
5335
 
5128
- /* "fontTools/cu2qu/cu2qu.py":319
5336
+ /* "fontTools/cu2qu/cu2qu.py":351
5129
5337
  * return cubic_farthest_fit_inside(
5130
5338
  * p0, (p0 + p1) * 0.5, mid - deriv3, mid, tolerance
5131
5339
  * ) and cubic_farthest_fit_inside(mid, mid + deriv3, (p2 + p3) * 0.5, p3, tolerance) # <<<<<<<<<<<<<<
5132
5340
  *
5133
5341
  *
5134
5342
  */
5135
- __pyx_t_4 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_v_mid, __Pyx_c_sum_double(__pyx_v_mid, __pyx_v_deriv3), __Pyx_c_prod_double(__Pyx_c_sum_double(__pyx_v_p2, __pyx_v_p3), __pyx_t_double_complex_from_parts(0.5, 0)), __pyx_v_p3, __pyx_v_tolerance); if (unlikely(__pyx_t_4 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 319, __pyx_L1_error)
5343
+ __pyx_t_4 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_v_mid, __Pyx_c_sum_double(__pyx_v_mid, __pyx_v_deriv3), __Pyx_c_prod_double(__Pyx_c_sum_double(__pyx_v_p2, __pyx_v_p3), __pyx_t_double_complex_from_parts(0.5, 0)), __pyx_v_p3, __pyx_v_tolerance); if (unlikely(__pyx_t_4 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 351, __pyx_L1_error)
5136
5344
  __pyx_t_3 = __pyx_t_4;
5137
5345
  __pyx_L7_bool_binop_done:;
5138
5346
  __pyx_r = __pyx_t_3;
5139
5347
  goto __pyx_L0;
5140
5348
 
5141
- /* "fontTools/cu2qu/cu2qu.py":280
5349
+ /* "fontTools/cu2qu/cu2qu.py":312
5142
5350
  *
5143
5351
  *
5144
5352
  * @cython.cfunc # <<<<<<<<<<<<<<
@@ -5154,7 +5362,7 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
5154
5362
  return __pyx_r;
5155
5363
  }
5156
5364
 
5157
- /* "fontTools/cu2qu/cu2qu.py":322
5365
+ /* "fontTools/cu2qu/cu2qu.py":354
5158
5366
  *
5159
5367
  *
5160
5368
  * @cython.cfunc # <<<<<<<<<<<<<<
@@ -5187,33 +5395,33 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
5187
5395
  int __pyx_clineno = 0;
5188
5396
  __Pyx_RefNannySetupContext("cubic_approx_quadratic", 0);
5189
5397
 
5190
- /* "fontTools/cu2qu/cu2qu.py":346
5398
+ /* "fontTools/cu2qu/cu2qu.py":378
5191
5399
  * """
5192
5400
  *
5193
5401
  * q1 = calc_intersect(cubic[0], cubic[1], cubic[2], cubic[3]) # <<<<<<<<<<<<<<
5194
5402
  * if math.isnan(q1.imag):
5195
5403
  * return None
5196
5404
  */
5197
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
5405
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error)
5198
5406
  __Pyx_GOTREF(__pyx_t_1);
5199
- __pyx_t_2 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L1_error)
5407
+ __pyx_t_2 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 378, __pyx_L1_error)
5200
5408
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5201
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
5409
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error)
5202
5410
  __Pyx_GOTREF(__pyx_t_1);
5203
- __pyx_t_3 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L1_error)
5411
+ __pyx_t_3 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 378, __pyx_L1_error)
5204
5412
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5205
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
5413
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error)
5206
5414
  __Pyx_GOTREF(__pyx_t_1);
5207
- __pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L1_error)
5415
+ __pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 378, __pyx_L1_error)
5208
5416
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5209
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
5417
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error)
5210
5418
  __Pyx_GOTREF(__pyx_t_1);
5211
- __pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L1_error)
5419
+ __pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 378, __pyx_L1_error)
5212
5420
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5213
- __pyx_t_6 = __pyx_f_9fontTools_5cu2qu_5cu2qu_calc_intersect(__pyx_t_2, __pyx_t_3, __pyx_t_4, __pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L1_error)
5421
+ __pyx_t_6 = __pyx_f_9fontTools_5cu2qu_5cu2qu_calc_intersect(__pyx_t_2, __pyx_t_3, __pyx_t_4, __pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 378, __pyx_L1_error)
5214
5422
  __pyx_v_q1 = __pyx_t_6;
5215
5423
 
5216
- /* "fontTools/cu2qu/cu2qu.py":347
5424
+ /* "fontTools/cu2qu/cu2qu.py":379
5217
5425
  *
5218
5426
  * q1 = calc_intersect(cubic[0], cubic[1], cubic[2], cubic[3])
5219
5427
  * if math.isnan(q1.imag): # <<<<<<<<<<<<<<
@@ -5221,12 +5429,12 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
5221
5429
  * c0 = cubic[0]
5222
5430
  */
5223
5431
  __pyx_t_7 = NULL;
5224
- __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_math); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 347, __pyx_L1_error)
5432
+ __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_math); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 379, __pyx_L1_error)
5225
5433
  __Pyx_GOTREF(__pyx_t_8);
5226
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_isnan); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 347, __pyx_L1_error)
5434
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_isnan); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 379, __pyx_L1_error)
5227
5435
  __Pyx_GOTREF(__pyx_t_9);
5228
5436
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5229
- __pyx_t_8 = PyFloat_FromDouble(__Pyx_CIMAG(__pyx_v_q1)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 347, __pyx_L1_error)
5437
+ __pyx_t_8 = PyFloat_FromDouble(__Pyx_CIMAG(__pyx_v_q1)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 379, __pyx_L1_error)
5230
5438
  __Pyx_GOTREF(__pyx_t_8);
5231
5439
  __pyx_t_10 = 1;
5232
5440
  #if CYTHON_UNPACK_METHODS
@@ -5246,14 +5454,14 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
5246
5454
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
5247
5455
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5248
5456
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
5249
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error)
5457
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 379, __pyx_L1_error)
5250
5458
  __Pyx_GOTREF(__pyx_t_1);
5251
5459
  }
5252
- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 347, __pyx_L1_error)
5460
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 379, __pyx_L1_error)
5253
5461
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5254
5462
  if (__pyx_t_11) {
5255
5463
 
5256
- /* "fontTools/cu2qu/cu2qu.py":348
5464
+ /* "fontTools/cu2qu/cu2qu.py":380
5257
5465
  * q1 = calc_intersect(cubic[0], cubic[1], cubic[2], cubic[3])
5258
5466
  * if math.isnan(q1.imag):
5259
5467
  * return None # <<<<<<<<<<<<<<
@@ -5264,7 +5472,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
5264
5472
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5265
5473
  goto __pyx_L0;
5266
5474
 
5267
- /* "fontTools/cu2qu/cu2qu.py":347
5475
+ /* "fontTools/cu2qu/cu2qu.py":379
5268
5476
  *
5269
5477
  * q1 = calc_intersect(cubic[0], cubic[1], cubic[2], cubic[3])
5270
5478
  * if math.isnan(q1.imag): # <<<<<<<<<<<<<<
@@ -5273,33 +5481,33 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
5273
5481
  */
5274
5482
  }
5275
5483
 
5276
- /* "fontTools/cu2qu/cu2qu.py":349
5484
+ /* "fontTools/cu2qu/cu2qu.py":381
5277
5485
  * if math.isnan(q1.imag):
5278
5486
  * return None
5279
5487
  * c0 = cubic[0] # <<<<<<<<<<<<<<
5280
5488
  * c3 = cubic[3]
5281
5489
  * c1 = c0 + (q1 - c0) * (2 / 3)
5282
5490
  */
5283
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error)
5491
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 381, __pyx_L1_error)
5284
5492
  __Pyx_GOTREF(__pyx_t_1);
5285
- __pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 349, __pyx_L1_error)
5493
+ __pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 381, __pyx_L1_error)
5286
5494
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5287
5495
  __pyx_v_c0 = __pyx_t_6;
5288
5496
 
5289
- /* "fontTools/cu2qu/cu2qu.py":350
5497
+ /* "fontTools/cu2qu/cu2qu.py":382
5290
5498
  * return None
5291
5499
  * c0 = cubic[0]
5292
5500
  * c3 = cubic[3] # <<<<<<<<<<<<<<
5293
5501
  * c1 = c0 + (q1 - c0) * (2 / 3)
5294
5502
  * c2 = c3 + (q1 - c3) * (2 / 3)
5295
5503
  */
5296
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 350, __pyx_L1_error)
5504
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __pyx_L1_error)
5297
5505
  __Pyx_GOTREF(__pyx_t_1);
5298
- __pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 350, __pyx_L1_error)
5506
+ __pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 382, __pyx_L1_error)
5299
5507
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5300
5508
  __pyx_v_c3 = __pyx_t_6;
5301
5509
 
5302
- /* "fontTools/cu2qu/cu2qu.py":351
5510
+ /* "fontTools/cu2qu/cu2qu.py":383
5303
5511
  * c0 = cubic[0]
5304
5512
  * c3 = cubic[3]
5305
5513
  * c1 = c0 + (q1 - c0) * (2 / 3) # <<<<<<<<<<<<<<
@@ -5308,7 +5516,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
5308
5516
  */
5309
5517
  __pyx_v_c1 = __Pyx_c_sum_double(__pyx_v_c0, __Pyx_c_prod_double(__Pyx_c_diff_double(__pyx_v_q1, __pyx_v_c0), __pyx_t_double_complex_from_parts((2.0 / 3.0), 0)));
5310
5518
 
5311
- /* "fontTools/cu2qu/cu2qu.py":352
5519
+ /* "fontTools/cu2qu/cu2qu.py":384
5312
5520
  * c3 = cubic[3]
5313
5521
  * c1 = c0 + (q1 - c0) * (2 / 3)
5314
5522
  * c2 = c3 + (q1 - c3) * (2 / 3) # <<<<<<<<<<<<<<
@@ -5317,38 +5525,38 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
5317
5525
  */
5318
5526
  __pyx_v_c2 = __Pyx_c_sum_double(__pyx_v_c3, __Pyx_c_prod_double(__Pyx_c_diff_double(__pyx_v_q1, __pyx_v_c3), __pyx_t_double_complex_from_parts((2.0 / 3.0), 0)));
5319
5527
 
5320
- /* "fontTools/cu2qu/cu2qu.py":353
5528
+ /* "fontTools/cu2qu/cu2qu.py":385
5321
5529
  * c1 = c0 + (q1 - c0) * (2 / 3)
5322
5530
  * c2 = c3 + (q1 - c3) * (2 / 3)
5323
5531
  * if not cubic_farthest_fit_inside(0, c1 - cubic[1], c2 - cubic[2], 0, tolerance): # <<<<<<<<<<<<<<
5324
5532
  * return None
5325
5533
  * return c0, q1, c3
5326
5534
  */
5327
- __pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_c1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
5535
+ __pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_c1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 385, __pyx_L1_error)
5328
5536
  __Pyx_GOTREF(__pyx_t_1);
5329
- __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 353, __pyx_L1_error)
5537
+ __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 385, __pyx_L1_error)
5330
5538
  __Pyx_GOTREF(__pyx_t_9);
5331
- __pyx_t_8 = PyNumber_Subtract(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 353, __pyx_L1_error)
5539
+ __pyx_t_8 = PyNumber_Subtract(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 385, __pyx_L1_error)
5332
5540
  __Pyx_GOTREF(__pyx_t_8);
5333
5541
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5334
5542
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
5335
- __pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 353, __pyx_L1_error)
5543
+ __pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 385, __pyx_L1_error)
5336
5544
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5337
- __pyx_t_8 = __pyx_PyComplex_FromComplex(__pyx_v_c2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 353, __pyx_L1_error)
5545
+ __pyx_t_8 = __pyx_PyComplex_FromComplex(__pyx_v_c2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 385, __pyx_L1_error)
5338
5546
  __Pyx_GOTREF(__pyx_t_8);
5339
- __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 353, __pyx_L1_error)
5547
+ __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 385, __pyx_L1_error)
5340
5548
  __Pyx_GOTREF(__pyx_t_9);
5341
- __pyx_t_1 = PyNumber_Subtract(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
5549
+ __pyx_t_1 = PyNumber_Subtract(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 385, __pyx_L1_error)
5342
5550
  __Pyx_GOTREF(__pyx_t_1);
5343
5551
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5344
5552
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
5345
- __pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 353, __pyx_L1_error)
5553
+ __pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 385, __pyx_L1_error)
5346
5554
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5347
- __pyx_t_12 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_double_complex_from_parts(0, 0), __pyx_t_6, __pyx_t_5, __pyx_t_double_complex_from_parts(0, 0), __pyx_v_tolerance); if (unlikely(__pyx_t_12 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 353, __pyx_L1_error)
5555
+ __pyx_t_12 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_double_complex_from_parts(0, 0), __pyx_t_6, __pyx_t_5, __pyx_t_double_complex_from_parts(0, 0), __pyx_v_tolerance); if (unlikely(__pyx_t_12 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 385, __pyx_L1_error)
5348
5556
  __pyx_t_11 = (!(__pyx_t_12 != 0));
5349
5557
  if (__pyx_t_11) {
5350
5558
 
5351
- /* "fontTools/cu2qu/cu2qu.py":354
5559
+ /* "fontTools/cu2qu/cu2qu.py":386
5352
5560
  * c2 = c3 + (q1 - c3) * (2 / 3)
5353
5561
  * if not cubic_farthest_fit_inside(0, c1 - cubic[1], c2 - cubic[2], 0, tolerance):
5354
5562
  * return None # <<<<<<<<<<<<<<
@@ -5359,7 +5567,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
5359
5567
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5360
5568
  goto __pyx_L0;
5361
5569
 
5362
- /* "fontTools/cu2qu/cu2qu.py":353
5570
+ /* "fontTools/cu2qu/cu2qu.py":385
5363
5571
  * c1 = c0 + (q1 - c0) * (2 / 3)
5364
5572
  * c2 = c3 + (q1 - c3) * (2 / 3)
5365
5573
  * if not cubic_farthest_fit_inside(0, c1 - cubic[1], c2 - cubic[2], 0, tolerance): # <<<<<<<<<<<<<<
@@ -5368,7 +5576,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
5368
5576
  */
5369
5577
  }
5370
5578
 
5371
- /* "fontTools/cu2qu/cu2qu.py":355
5579
+ /* "fontTools/cu2qu/cu2qu.py":387
5372
5580
  * if not cubic_farthest_fit_inside(0, c1 - cubic[1], c2 - cubic[2], 0, tolerance):
5373
5581
  * return None
5374
5582
  * return c0, q1, c3 # <<<<<<<<<<<<<<
@@ -5376,20 +5584,20 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
5376
5584
  *
5377
5585
  */
5378
5586
  __Pyx_XDECREF(__pyx_r);
5379
- __pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_c0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error)
5587
+ __pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_c0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 387, __pyx_L1_error)
5380
5588
  __Pyx_GOTREF(__pyx_t_1);
5381
- __pyx_t_9 = __pyx_PyComplex_FromComplex(__pyx_v_q1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 355, __pyx_L1_error)
5589
+ __pyx_t_9 = __pyx_PyComplex_FromComplex(__pyx_v_q1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 387, __pyx_L1_error)
5382
5590
  __Pyx_GOTREF(__pyx_t_9);
5383
- __pyx_t_8 = __pyx_PyComplex_FromComplex(__pyx_v_c3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 355, __pyx_L1_error)
5591
+ __pyx_t_8 = __pyx_PyComplex_FromComplex(__pyx_v_c3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 387, __pyx_L1_error)
5384
5592
  __Pyx_GOTREF(__pyx_t_8);
5385
- __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 355, __pyx_L1_error)
5593
+ __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 387, __pyx_L1_error)
5386
5594
  __Pyx_GOTREF(__pyx_t_7);
5387
5595
  __Pyx_GIVEREF(__pyx_t_1);
5388
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 355, __pyx_L1_error);
5596
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 387, __pyx_L1_error);
5389
5597
  __Pyx_GIVEREF(__pyx_t_9);
5390
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9) != (0)) __PYX_ERR(0, 355, __pyx_L1_error);
5598
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9) != (0)) __PYX_ERR(0, 387, __pyx_L1_error);
5391
5599
  __Pyx_GIVEREF(__pyx_t_8);
5392
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_8) != (0)) __PYX_ERR(0, 355, __pyx_L1_error);
5600
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_8) != (0)) __PYX_ERR(0, 387, __pyx_L1_error);
5393
5601
  __pyx_t_1 = 0;
5394
5602
  __pyx_t_9 = 0;
5395
5603
  __pyx_t_8 = 0;
@@ -5397,7 +5605,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
5397
5605
  __pyx_t_7 = 0;
5398
5606
  goto __pyx_L0;
5399
5607
 
5400
- /* "fontTools/cu2qu/cu2qu.py":322
5608
+ /* "fontTools/cu2qu/cu2qu.py":354
5401
5609
  *
5402
5610
  *
5403
5611
  * @cython.cfunc # <<<<<<<<<<<<<<
@@ -5419,7 +5627,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
5419
5627
  return __pyx_r;
5420
5628
  }
5421
5629
 
5422
- /* "fontTools/cu2qu/cu2qu.py":358
5630
+ /* "fontTools/cu2qu/cu2qu.py":390
5423
5631
  *
5424
5632
  *
5425
5633
  * @cython.cfunc # <<<<<<<<<<<<<<
@@ -5468,7 +5676,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5468
5676
  int __pyx_clineno = 0;
5469
5677
  __Pyx_RefNannySetupContext("cubic_approx_spline", 0);
5470
5678
 
5471
- /* "fontTools/cu2qu/cu2qu.py":387
5679
+ /* "fontTools/cu2qu/cu2qu.py":419
5472
5680
  * """
5473
5681
  *
5474
5682
  * if n == 1: # <<<<<<<<<<<<<<
@@ -5478,7 +5686,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5478
5686
  __pyx_t_1 = (__pyx_v_n == 1);
5479
5687
  if (__pyx_t_1) {
5480
5688
 
5481
- /* "fontTools/cu2qu/cu2qu.py":388
5689
+ /* "fontTools/cu2qu/cu2qu.py":420
5482
5690
  *
5483
5691
  * if n == 1:
5484
5692
  * return cubic_approx_quadratic(cubic, tolerance) # <<<<<<<<<<<<<<
@@ -5486,13 +5694,13 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5486
5694
  * return cubic
5487
5695
  */
5488
5696
  __Pyx_XDECREF(__pyx_r);
5489
- __pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_quadratic(__pyx_v_cubic, __pyx_v_tolerance); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 388, __pyx_L1_error)
5697
+ __pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_quadratic(__pyx_v_cubic, __pyx_v_tolerance); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 420, __pyx_L1_error)
5490
5698
  __Pyx_GOTREF(__pyx_t_2);
5491
5699
  __pyx_r = __pyx_t_2;
5492
5700
  __pyx_t_2 = 0;
5493
5701
  goto __pyx_L0;
5494
5702
 
5495
- /* "fontTools/cu2qu/cu2qu.py":387
5703
+ /* "fontTools/cu2qu/cu2qu.py":419
5496
5704
  * """
5497
5705
  *
5498
5706
  * if n == 1: # <<<<<<<<<<<<<<
@@ -5501,7 +5709,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5501
5709
  */
5502
5710
  }
5503
5711
 
5504
- /* "fontTools/cu2qu/cu2qu.py":389
5712
+ /* "fontTools/cu2qu/cu2qu.py":421
5505
5713
  * if n == 1:
5506
5714
  * return cubic_approx_quadratic(cubic, tolerance)
5507
5715
  * if n == 2 and all_quadratic == False: # <<<<<<<<<<<<<<
@@ -5519,7 +5727,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5519
5727
  __pyx_L5_bool_binop_done:;
5520
5728
  if (__pyx_t_1) {
5521
5729
 
5522
- /* "fontTools/cu2qu/cu2qu.py":390
5730
+ /* "fontTools/cu2qu/cu2qu.py":422
5523
5731
  * return cubic_approx_quadratic(cubic, tolerance)
5524
5732
  * if n == 2 and all_quadratic == False:
5525
5733
  * return cubic # <<<<<<<<<<<<<<
@@ -5531,7 +5739,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5531
5739
  __pyx_r = __pyx_v_cubic;
5532
5740
  goto __pyx_L0;
5533
5741
 
5534
- /* "fontTools/cu2qu/cu2qu.py":389
5742
+ /* "fontTools/cu2qu/cu2qu.py":421
5535
5743
  * if n == 1:
5536
5744
  * return cubic_approx_quadratic(cubic, tolerance)
5537
5745
  * if n == 2 and all_quadratic == False: # <<<<<<<<<<<<<<
@@ -5540,97 +5748,97 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5540
5748
  */
5541
5749
  }
5542
5750
 
5543
- /* "fontTools/cu2qu/cu2qu.py":392
5751
+ /* "fontTools/cu2qu/cu2qu.py":424
5544
5752
  * return cubic
5545
5753
  *
5546
5754
  * cubics = split_cubic_into_n_iter(cubic[0], cubic[1], cubic[2], cubic[3], n) # <<<<<<<<<<<<<<
5547
5755
  *
5548
5756
  * # calculate the spline of quadratics and check errors at the same time.
5549
5757
  */
5550
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error)
5758
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 424, __pyx_L1_error)
5551
5759
  __Pyx_GOTREF(__pyx_t_2);
5552
- __pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 392, __pyx_L1_error)
5760
+ __pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 424, __pyx_L1_error)
5553
5761
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5554
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error)
5762
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 424, __pyx_L1_error)
5555
5763
  __Pyx_GOTREF(__pyx_t_2);
5556
- __pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 392, __pyx_L1_error)
5764
+ __pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 424, __pyx_L1_error)
5557
5765
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5558
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error)
5766
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 424, __pyx_L1_error)
5559
5767
  __Pyx_GOTREF(__pyx_t_2);
5560
- __pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 392, __pyx_L1_error)
5768
+ __pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 424, __pyx_L1_error)
5561
5769
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5562
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error)
5770
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 424, __pyx_L1_error)
5563
5771
  __Pyx_GOTREF(__pyx_t_2);
5564
- __pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 392, __pyx_L1_error)
5772
+ __pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 424, __pyx_L1_error)
5565
5773
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5566
- __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error)
5774
+ __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 424, __pyx_L1_error)
5567
5775
  __Pyx_GOTREF(__pyx_t_2);
5568
- __pyx_t_8 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_n_iter(__pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 392, __pyx_L1_error)
5776
+ __pyx_t_8 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_n_iter(__pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 424, __pyx_L1_error)
5569
5777
  __Pyx_GOTREF(__pyx_t_8);
5570
5778
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5571
5779
  __pyx_v_cubics = __pyx_t_8;
5572
5780
  __pyx_t_8 = 0;
5573
5781
 
5574
- /* "fontTools/cu2qu/cu2qu.py":395
5782
+ /* "fontTools/cu2qu/cu2qu.py":427
5575
5783
  *
5576
5784
  * # calculate the spline of quadratics and check errors at the same time.
5577
5785
  * next_cubic = next(cubics) # <<<<<<<<<<<<<<
5578
5786
  * next_q1 = cubic_approx_control(
5579
5787
  * 0, next_cubic[0], next_cubic[1], next_cubic[2], next_cubic[3]
5580
5788
  */
5581
- __pyx_t_8 = __Pyx_PyIter_Next(__pyx_v_cubics); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 395, __pyx_L1_error)
5789
+ __pyx_t_8 = __Pyx_PyIter_Next(__pyx_v_cubics); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 427, __pyx_L1_error)
5582
5790
  __Pyx_GOTREF(__pyx_t_8);
5583
5791
  __pyx_v_next_cubic = __pyx_t_8;
5584
5792
  __pyx_t_8 = 0;
5585
5793
 
5586
- /* "fontTools/cu2qu/cu2qu.py":397
5794
+ /* "fontTools/cu2qu/cu2qu.py":429
5587
5795
  * next_cubic = next(cubics)
5588
5796
  * next_q1 = cubic_approx_control(
5589
5797
  * 0, next_cubic[0], next_cubic[1], next_cubic[2], next_cubic[3] # <<<<<<<<<<<<<<
5590
5798
  * )
5591
5799
  * q2 = cubic[0]
5592
5800
  */
5593
- __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_next_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 397, __pyx_L1_error)
5801
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_next_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 429, __pyx_L1_error)
5594
5802
  __Pyx_GOTREF(__pyx_t_8);
5595
- __pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 397, __pyx_L1_error)
5803
+ __pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 429, __pyx_L1_error)
5596
5804
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5597
- __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_next_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 397, __pyx_L1_error)
5805
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_next_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 429, __pyx_L1_error)
5598
5806
  __Pyx_GOTREF(__pyx_t_8);
5599
- __pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 397, __pyx_L1_error)
5807
+ __pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 429, __pyx_L1_error)
5600
5808
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5601
- __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_next_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 397, __pyx_L1_error)
5809
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_next_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 429, __pyx_L1_error)
5602
5810
  __Pyx_GOTREF(__pyx_t_8);
5603
- __pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 397, __pyx_L1_error)
5811
+ __pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 429, __pyx_L1_error)
5604
5812
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5605
- __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_next_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 397, __pyx_L1_error)
5813
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_next_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 429, __pyx_L1_error)
5606
5814
  __Pyx_GOTREF(__pyx_t_8);
5607
- __pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 397, __pyx_L1_error)
5815
+ __pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 429, __pyx_L1_error)
5608
5816
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5609
5817
 
5610
- /* "fontTools/cu2qu/cu2qu.py":396
5818
+ /* "fontTools/cu2qu/cu2qu.py":428
5611
5819
  * # calculate the spline of quadratics and check errors at the same time.
5612
5820
  * next_cubic = next(cubics)
5613
5821
  * next_q1 = cubic_approx_control( # <<<<<<<<<<<<<<
5614
5822
  * 0, next_cubic[0], next_cubic[1], next_cubic[2], next_cubic[3]
5615
5823
  * )
5616
5824
  */
5617
- __pyx_t_9 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_control(0.0, __pyx_t_7, __pyx_t_6, __pyx_t_5, __pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 396, __pyx_L1_error)
5825
+ __pyx_t_9 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_control(0.0, __pyx_t_7, __pyx_t_6, __pyx_t_5, __pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 428, __pyx_L1_error)
5618
5826
  __pyx_v_next_q1 = __pyx_t_9;
5619
5827
 
5620
- /* "fontTools/cu2qu/cu2qu.py":399
5828
+ /* "fontTools/cu2qu/cu2qu.py":431
5621
5829
  * 0, next_cubic[0], next_cubic[1], next_cubic[2], next_cubic[3]
5622
5830
  * )
5623
5831
  * q2 = cubic[0] # <<<<<<<<<<<<<<
5624
5832
  * d1 = 0j
5625
5833
  * spline = [cubic[0], next_q1]
5626
5834
  */
5627
- __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 399, __pyx_L1_error)
5835
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 431, __pyx_L1_error)
5628
5836
  __Pyx_GOTREF(__pyx_t_8);
5629
- __pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 399, __pyx_L1_error)
5837
+ __pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 431, __pyx_L1_error)
5630
5838
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5631
5839
  __pyx_v_q2 = __pyx_t_9;
5632
5840
 
5633
- /* "fontTools/cu2qu/cu2qu.py":400
5841
+ /* "fontTools/cu2qu/cu2qu.py":432
5634
5842
  * )
5635
5843
  * q2 = cubic[0]
5636
5844
  * d1 = 0j # <<<<<<<<<<<<<<
@@ -5639,29 +5847,29 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5639
5847
  */
5640
5848
  __pyx_v_d1 = __pyx_t_double_complex_from_parts(0, 0.0);
5641
5849
 
5642
- /* "fontTools/cu2qu/cu2qu.py":401
5850
+ /* "fontTools/cu2qu/cu2qu.py":433
5643
5851
  * q2 = cubic[0]
5644
5852
  * d1 = 0j
5645
5853
  * spline = [cubic[0], next_q1] # <<<<<<<<<<<<<<
5646
5854
  * for i in range(1, n + 1):
5647
5855
  * # Current cubic to convert
5648
5856
  */
5649
- __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 401, __pyx_L1_error)
5857
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 433, __pyx_L1_error)
5650
5858
  __Pyx_GOTREF(__pyx_t_8);
5651
- __pyx_t_2 = __pyx_PyComplex_FromComplex(__pyx_v_next_q1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 401, __pyx_L1_error)
5859
+ __pyx_t_2 = __pyx_PyComplex_FromComplex(__pyx_v_next_q1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 433, __pyx_L1_error)
5652
5860
  __Pyx_GOTREF(__pyx_t_2);
5653
- __pyx_t_10 = PyList_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 401, __pyx_L1_error)
5861
+ __pyx_t_10 = PyList_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 433, __pyx_L1_error)
5654
5862
  __Pyx_GOTREF(__pyx_t_10);
5655
5863
  __Pyx_GIVEREF(__pyx_t_8);
5656
- if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_8) != (0)) __PYX_ERR(0, 401, __pyx_L1_error);
5864
+ if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_8) != (0)) __PYX_ERR(0, 433, __pyx_L1_error);
5657
5865
  __Pyx_GIVEREF(__pyx_t_2);
5658
- if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 401, __pyx_L1_error);
5866
+ if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 433, __pyx_L1_error);
5659
5867
  __pyx_t_8 = 0;
5660
5868
  __pyx_t_2 = 0;
5661
5869
  __pyx_v_spline = ((PyObject*)__pyx_t_10);
5662
5870
  __pyx_t_10 = 0;
5663
5871
 
5664
- /* "fontTools/cu2qu/cu2qu.py":402
5872
+ /* "fontTools/cu2qu/cu2qu.py":434
5665
5873
  * d1 = 0j
5666
5874
  * spline = [cubic[0], next_q1]
5667
5875
  * for i in range(1, n + 1): # <<<<<<<<<<<<<<
@@ -5673,7 +5881,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5673
5881
  for (__pyx_t_13 = 1; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
5674
5882
  __pyx_v_i = __pyx_t_13;
5675
5883
 
5676
- /* "fontTools/cu2qu/cu2qu.py":404
5884
+ /* "fontTools/cu2qu/cu2qu.py":436
5677
5885
  * for i in range(1, n + 1):
5678
5886
  * # Current cubic to convert
5679
5887
  * c0, c1, c2, c3 = next_cubic # <<<<<<<<<<<<<<
@@ -5686,7 +5894,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5686
5894
  if (unlikely(size != 4)) {
5687
5895
  if (size > 4) __Pyx_RaiseTooManyValuesError(4);
5688
5896
  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
5689
- __PYX_ERR(0, 404, __pyx_L1_error)
5897
+ __PYX_ERR(0, 436, __pyx_L1_error)
5690
5898
  }
5691
5899
  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5692
5900
  if (likely(PyTuple_CheckExact(sequence))) {
@@ -5700,16 +5908,16 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5700
5908
  __Pyx_INCREF(__pyx_t_14);
5701
5909
  } else {
5702
5910
  __pyx_t_10 = __Pyx_PyList_GetItemRef(sequence, 0);
5703
- if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 404, __pyx_L1_error)
5911
+ if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 436, __pyx_L1_error)
5704
5912
  __Pyx_XGOTREF(__pyx_t_10);
5705
5913
  __pyx_t_2 = __Pyx_PyList_GetItemRef(sequence, 1);
5706
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 404, __pyx_L1_error)
5914
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 436, __pyx_L1_error)
5707
5915
  __Pyx_XGOTREF(__pyx_t_2);
5708
5916
  __pyx_t_8 = __Pyx_PyList_GetItemRef(sequence, 2);
5709
- if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 404, __pyx_L1_error)
5917
+ if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 436, __pyx_L1_error)
5710
5918
  __Pyx_XGOTREF(__pyx_t_8);
5711
5919
  __pyx_t_14 = __Pyx_PyList_GetItemRef(sequence, 3);
5712
- if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 404, __pyx_L1_error)
5920
+ if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 436, __pyx_L1_error)
5713
5921
  __Pyx_XGOTREF(__pyx_t_14);
5714
5922
  }
5715
5923
  #else
@@ -5717,7 +5925,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5717
5925
  Py_ssize_t i;
5718
5926
  PyObject** temps[4] = {&__pyx_t_10,&__pyx_t_2,&__pyx_t_8,&__pyx_t_14};
5719
5927
  for (i=0; i < 4; i++) {
5720
- PyObject* item = __Pyx_PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 404, __pyx_L1_error)
5928
+ PyObject* item = __Pyx_PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 436, __pyx_L1_error)
5721
5929
  __Pyx_GOTREF(item);
5722
5930
  *(temps[i]) = item;
5723
5931
  }
@@ -5726,7 +5934,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5726
5934
  } else {
5727
5935
  Py_ssize_t index = -1;
5728
5936
  PyObject** temps[4] = {&__pyx_t_10,&__pyx_t_2,&__pyx_t_8,&__pyx_t_14};
5729
- __pyx_t_15 = PyObject_GetIter(__pyx_v_next_cubic); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 404, __pyx_L1_error)
5937
+ __pyx_t_15 = PyObject_GetIter(__pyx_v_next_cubic); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 436, __pyx_L1_error)
5730
5938
  __Pyx_GOTREF(__pyx_t_15);
5731
5939
  __pyx_t_16 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_15);
5732
5940
  for (index=0; index < 4; index++) {
@@ -5734,7 +5942,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5734
5942
  __Pyx_GOTREF(item);
5735
5943
  *(temps[index]) = item;
5736
5944
  }
5737
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_15), 4) < 0) __PYX_ERR(0, 404, __pyx_L1_error)
5945
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_15), 4) < 0) __PYX_ERR(0, 436, __pyx_L1_error)
5738
5946
  __pyx_t_16 = NULL;
5739
5947
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
5740
5948
  goto __pyx_L10_unpacking_done;
@@ -5742,23 +5950,23 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5742
5950
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
5743
5951
  __pyx_t_16 = NULL;
5744
5952
  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
5745
- __PYX_ERR(0, 404, __pyx_L1_error)
5953
+ __PYX_ERR(0, 436, __pyx_L1_error)
5746
5954
  __pyx_L10_unpacking_done:;
5747
5955
  }
5748
- __pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 404, __pyx_L1_error)
5956
+ __pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 436, __pyx_L1_error)
5749
5957
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
5750
- __pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 404, __pyx_L1_error)
5958
+ __pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 436, __pyx_L1_error)
5751
5959
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5752
- __pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 404, __pyx_L1_error)
5960
+ __pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 436, __pyx_L1_error)
5753
5961
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5754
- __pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 404, __pyx_L1_error)
5962
+ __pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 436, __pyx_L1_error)
5755
5963
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
5756
5964
  __pyx_v_c0 = __pyx_t_9;
5757
5965
  __pyx_v_c1 = __pyx_t_4;
5758
5966
  __pyx_v_c2 = __pyx_t_5;
5759
5967
  __pyx_v_c3 = __pyx_t_6;
5760
5968
 
5761
- /* "fontTools/cu2qu/cu2qu.py":407
5969
+ /* "fontTools/cu2qu/cu2qu.py":439
5762
5970
  *
5763
5971
  * # Current quadratic approximation of current cubic
5764
5972
  * q0 = q2 # <<<<<<<<<<<<<<
@@ -5767,7 +5975,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5767
5975
  */
5768
5976
  __pyx_v_q0 = __pyx_v_q2;
5769
5977
 
5770
- /* "fontTools/cu2qu/cu2qu.py":408
5978
+ /* "fontTools/cu2qu/cu2qu.py":440
5771
5979
  * # Current quadratic approximation of current cubic
5772
5980
  * q0 = q2
5773
5981
  * q1 = next_q1 # <<<<<<<<<<<<<<
@@ -5776,7 +5984,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5776
5984
  */
5777
5985
  __pyx_v_q1 = __pyx_v_next_q1;
5778
5986
 
5779
- /* "fontTools/cu2qu/cu2qu.py":409
5987
+ /* "fontTools/cu2qu/cu2qu.py":441
5780
5988
  * q0 = q2
5781
5989
  * q1 = next_q1
5782
5990
  * if i < n: # <<<<<<<<<<<<<<
@@ -5786,19 +5994,19 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5786
5994
  __pyx_t_1 = (__pyx_v_i < __pyx_v_n);
5787
5995
  if (__pyx_t_1) {
5788
5996
 
5789
- /* "fontTools/cu2qu/cu2qu.py":410
5997
+ /* "fontTools/cu2qu/cu2qu.py":442
5790
5998
  * q1 = next_q1
5791
5999
  * if i < n:
5792
6000
  * next_cubic = next(cubics) # <<<<<<<<<<<<<<
5793
6001
  * next_q1 = cubic_approx_control(
5794
6002
  * i / (n - 1), next_cubic[0], next_cubic[1], next_cubic[2], next_cubic[3]
5795
6003
  */
5796
- __pyx_t_14 = __Pyx_PyIter_Next(__pyx_v_cubics); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 410, __pyx_L1_error)
6004
+ __pyx_t_14 = __Pyx_PyIter_Next(__pyx_v_cubics); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 442, __pyx_L1_error)
5797
6005
  __Pyx_GOTREF(__pyx_t_14);
5798
6006
  __Pyx_DECREF_SET(__pyx_v_next_cubic, __pyx_t_14);
5799
6007
  __pyx_t_14 = 0;
5800
6008
 
5801
- /* "fontTools/cu2qu/cu2qu.py":412
6009
+ /* "fontTools/cu2qu/cu2qu.py":444
5802
6010
  * next_cubic = next(cubics)
5803
6011
  * next_q1 = cubic_approx_control(
5804
6012
  * i / (n - 1), next_cubic[0], next_cubic[1], next_cubic[2], next_cubic[3] # <<<<<<<<<<<<<<
@@ -5808,48 +6016,48 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5808
6016
  __pyx_t_17 = (__pyx_v_n - 1);
5809
6017
  if (unlikely(__pyx_t_17 == 0)) {
5810
6018
  PyErr_SetString(PyExc_ZeroDivisionError, "float division");
5811
- __PYX_ERR(0, 412, __pyx_L1_error)
6019
+ __PYX_ERR(0, 444, __pyx_L1_error)
5812
6020
  }
5813
- __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_next_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 412, __pyx_L1_error)
6021
+ __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_next_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 444, __pyx_L1_error)
5814
6022
  __Pyx_GOTREF(__pyx_t_14);
5815
- __pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 412, __pyx_L1_error)
6023
+ __pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 444, __pyx_L1_error)
5816
6024
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
5817
- __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_next_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 412, __pyx_L1_error)
6025
+ __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_next_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 444, __pyx_L1_error)
5818
6026
  __Pyx_GOTREF(__pyx_t_14);
5819
- __pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 412, __pyx_L1_error)
6027
+ __pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 444, __pyx_L1_error)
5820
6028
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
5821
- __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_next_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 412, __pyx_L1_error)
6029
+ __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_next_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 444, __pyx_L1_error)
5822
6030
  __Pyx_GOTREF(__pyx_t_14);
5823
- __pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 412, __pyx_L1_error)
6031
+ __pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 444, __pyx_L1_error)
5824
6032
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
5825
- __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_next_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 412, __pyx_L1_error)
6033
+ __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_next_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 444, __pyx_L1_error)
5826
6034
  __Pyx_GOTREF(__pyx_t_14);
5827
- __pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 412, __pyx_L1_error)
6035
+ __pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 444, __pyx_L1_error)
5828
6036
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
5829
6037
 
5830
- /* "fontTools/cu2qu/cu2qu.py":411
6038
+ /* "fontTools/cu2qu/cu2qu.py":443
5831
6039
  * if i < n:
5832
6040
  * next_cubic = next(cubics)
5833
6041
  * next_q1 = cubic_approx_control( # <<<<<<<<<<<<<<
5834
6042
  * i / (n - 1), next_cubic[0], next_cubic[1], next_cubic[2], next_cubic[3]
5835
6043
  * )
5836
6044
  */
5837
- __pyx_t_7 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_control((((double)__pyx_v_i) / ((double)__pyx_t_17)), __pyx_t_6, __pyx_t_5, __pyx_t_4, __pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 411, __pyx_L1_error)
6045
+ __pyx_t_7 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_control((((double)__pyx_v_i) / ((double)__pyx_t_17)), __pyx_t_6, __pyx_t_5, __pyx_t_4, __pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 443, __pyx_L1_error)
5838
6046
  __pyx_v_next_q1 = __pyx_t_7;
5839
6047
 
5840
- /* "fontTools/cu2qu/cu2qu.py":414
6048
+ /* "fontTools/cu2qu/cu2qu.py":446
5841
6049
  * i / (n - 1), next_cubic[0], next_cubic[1], next_cubic[2], next_cubic[3]
5842
6050
  * )
5843
6051
  * spline.append(next_q1) # <<<<<<<<<<<<<<
5844
6052
  * q2 = (q1 + next_q1) * 0.5
5845
6053
  * else:
5846
6054
  */
5847
- __pyx_t_14 = __pyx_PyComplex_FromComplex(__pyx_v_next_q1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 414, __pyx_L1_error)
6055
+ __pyx_t_14 = __pyx_PyComplex_FromComplex(__pyx_v_next_q1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 446, __pyx_L1_error)
5848
6056
  __Pyx_GOTREF(__pyx_t_14);
5849
- __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_spline, __pyx_t_14); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 414, __pyx_L1_error)
6057
+ __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_spline, __pyx_t_14); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 446, __pyx_L1_error)
5850
6058
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
5851
6059
 
5852
- /* "fontTools/cu2qu/cu2qu.py":415
6060
+ /* "fontTools/cu2qu/cu2qu.py":447
5853
6061
  * )
5854
6062
  * spline.append(next_q1)
5855
6063
  * q2 = (q1 + next_q1) * 0.5 # <<<<<<<<<<<<<<
@@ -5858,7 +6066,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5858
6066
  */
5859
6067
  __pyx_v_q2 = __Pyx_c_prod_double(__Pyx_c_sum_double(__pyx_v_q1, __pyx_v_next_q1), __pyx_t_double_complex_from_parts(0.5, 0));
5860
6068
 
5861
- /* "fontTools/cu2qu/cu2qu.py":409
6069
+ /* "fontTools/cu2qu/cu2qu.py":441
5862
6070
  * q0 = q2
5863
6071
  * q1 = next_q1
5864
6072
  * if i < n: # <<<<<<<<<<<<<<
@@ -5868,7 +6076,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5868
6076
  goto __pyx_L11;
5869
6077
  }
5870
6078
 
5871
- /* "fontTools/cu2qu/cu2qu.py":417
6079
+ /* "fontTools/cu2qu/cu2qu.py":449
5872
6080
  * q2 = (q1 + next_q1) * 0.5
5873
6081
  * else:
5874
6082
  * q2 = c3 # <<<<<<<<<<<<<<
@@ -5880,7 +6088,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5880
6088
  }
5881
6089
  __pyx_L11:;
5882
6090
 
5883
- /* "fontTools/cu2qu/cu2qu.py":420
6091
+ /* "fontTools/cu2qu/cu2qu.py":452
5884
6092
  *
5885
6093
  * # End-point deltas
5886
6094
  * d0 = d1 # <<<<<<<<<<<<<<
@@ -5889,7 +6097,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5889
6097
  */
5890
6098
  __pyx_v_d0 = __pyx_v_d1;
5891
6099
 
5892
- /* "fontTools/cu2qu/cu2qu.py":421
6100
+ /* "fontTools/cu2qu/cu2qu.py":453
5893
6101
  * # End-point deltas
5894
6102
  * d0 = d1
5895
6103
  * d1 = q2 - c3 # <<<<<<<<<<<<<<
@@ -5898,7 +6106,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5898
6106
  */
5899
6107
  __pyx_v_d1 = __Pyx_c_diff_double(__pyx_v_q2, __pyx_v_c3);
5900
6108
 
5901
- /* "fontTools/cu2qu/cu2qu.py":423
6109
+ /* "fontTools/cu2qu/cu2qu.py":455
5902
6110
  * d1 = q2 - c3
5903
6111
  *
5904
6112
  * if abs(d1) > tolerance or not cubic_farthest_fit_inside( # <<<<<<<<<<<<<<
@@ -5912,16 +6120,16 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5912
6120
  goto __pyx_L13_bool_binop_done;
5913
6121
  }
5914
6122
 
5915
- /* "fontTools/cu2qu/cu2qu.py":428
6123
+ /* "fontTools/cu2qu/cu2qu.py":460
5916
6124
  * q2 + (q1 - q2) * (2 / 3) - c2,
5917
6125
  * d1,
5918
6126
  * tolerance, # <<<<<<<<<<<<<<
5919
6127
  * ):
5920
6128
  * return None
5921
6129
  */
5922
- __pyx_t_19 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_v_d0, __Pyx_c_diff_double(__Pyx_c_sum_double(__pyx_v_q0, __Pyx_c_prod_double(__Pyx_c_diff_double(__pyx_v_q1, __pyx_v_q0), __pyx_t_double_complex_from_parts((2.0 / 3.0), 0))), __pyx_v_c1), __Pyx_c_diff_double(__Pyx_c_sum_double(__pyx_v_q2, __Pyx_c_prod_double(__Pyx_c_diff_double(__pyx_v_q1, __pyx_v_q2), __pyx_t_double_complex_from_parts((2.0 / 3.0), 0))), __pyx_v_c2), __pyx_v_d1, __pyx_v_tolerance); if (unlikely(__pyx_t_19 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 423, __pyx_L1_error)
6130
+ __pyx_t_19 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_v_d0, __Pyx_c_diff_double(__Pyx_c_sum_double(__pyx_v_q0, __Pyx_c_prod_double(__Pyx_c_diff_double(__pyx_v_q1, __pyx_v_q0), __pyx_t_double_complex_from_parts((2.0 / 3.0), 0))), __pyx_v_c1), __Pyx_c_diff_double(__Pyx_c_sum_double(__pyx_v_q2, __Pyx_c_prod_double(__Pyx_c_diff_double(__pyx_v_q1, __pyx_v_q2), __pyx_t_double_complex_from_parts((2.0 / 3.0), 0))), __pyx_v_c2), __pyx_v_d1, __pyx_v_tolerance); if (unlikely(__pyx_t_19 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 455, __pyx_L1_error)
5923
6131
 
5924
- /* "fontTools/cu2qu/cu2qu.py":423
6132
+ /* "fontTools/cu2qu/cu2qu.py":455
5925
6133
  * d1 = q2 - c3
5926
6134
  *
5927
6135
  * if abs(d1) > tolerance or not cubic_farthest_fit_inside( # <<<<<<<<<<<<<<
@@ -5933,7 +6141,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5933
6141
  __pyx_L13_bool_binop_done:;
5934
6142
  if (__pyx_t_1) {
5935
6143
 
5936
- /* "fontTools/cu2qu/cu2qu.py":430
6144
+ /* "fontTools/cu2qu/cu2qu.py":462
5937
6145
  * tolerance,
5938
6146
  * ):
5939
6147
  * return None # <<<<<<<<<<<<<<
@@ -5944,7 +6152,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5944
6152
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5945
6153
  goto __pyx_L0;
5946
6154
 
5947
- /* "fontTools/cu2qu/cu2qu.py":423
6155
+ /* "fontTools/cu2qu/cu2qu.py":455
5948
6156
  * d1 = q2 - c3
5949
6157
  *
5950
6158
  * if abs(d1) > tolerance or not cubic_farthest_fit_inside( # <<<<<<<<<<<<<<
@@ -5954,19 +6162,19 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5954
6162
  }
5955
6163
  }
5956
6164
 
5957
- /* "fontTools/cu2qu/cu2qu.py":431
6165
+ /* "fontTools/cu2qu/cu2qu.py":463
5958
6166
  * ):
5959
6167
  * return None
5960
6168
  * spline.append(cubic[3]) # <<<<<<<<<<<<<<
5961
6169
  *
5962
6170
  * return spline
5963
6171
  */
5964
- __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 431, __pyx_L1_error)
6172
+ __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 463, __pyx_L1_error)
5965
6173
  __Pyx_GOTREF(__pyx_t_14);
5966
- __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_spline, __pyx_t_14); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 431, __pyx_L1_error)
6174
+ __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_spline, __pyx_t_14); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 463, __pyx_L1_error)
5967
6175
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
5968
6176
 
5969
- /* "fontTools/cu2qu/cu2qu.py":433
6177
+ /* "fontTools/cu2qu/cu2qu.py":465
5970
6178
  * spline.append(cubic[3])
5971
6179
  *
5972
6180
  * return spline # <<<<<<<<<<<<<<
@@ -5978,7 +6186,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
5978
6186
  __pyx_r = __pyx_v_spline;
5979
6187
  goto __pyx_L0;
5980
6188
 
5981
- /* "fontTools/cu2qu/cu2qu.py":358
6189
+ /* "fontTools/cu2qu/cu2qu.py":390
5982
6190
  *
5983
6191
  *
5984
6192
  * @cython.cfunc # <<<<<<<<<<<<<<
@@ -6004,7 +6212,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
6004
6212
  return __pyx_r;
6005
6213
  }
6006
6214
 
6007
- /* "fontTools/cu2qu/cu2qu.py":436
6215
+ /* "fontTools/cu2qu/cu2qu.py":468
6008
6216
  *
6009
6217
  *
6010
6218
  * @cython.locals(max_err=cython.double) # <<<<<<<<<<<<<<
@@ -6054,51 +6262,51 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
6054
6262
  {
6055
6263
  PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_curve,&__pyx_mstate_global->__pyx_n_u_max_err,&__pyx_mstate_global->__pyx_n_u_all_quadratic,0};
6056
6264
  const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
6057
- if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 436, __pyx_L3_error)
6265
+ if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 468, __pyx_L3_error)
6058
6266
  if (__pyx_kwds_len > 0) {
6059
6267
  switch (__pyx_nargs) {
6060
6268
  case 3:
6061
6269
  values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
6062
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 436, __pyx_L3_error)
6270
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 468, __pyx_L3_error)
6063
6271
  CYTHON_FALLTHROUGH;
6064
6272
  case 2:
6065
6273
  values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
6066
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 436, __pyx_L3_error)
6274
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 468, __pyx_L3_error)
6067
6275
  CYTHON_FALLTHROUGH;
6068
6276
  case 1:
6069
6277
  values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6070
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 436, __pyx_L3_error)
6278
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 468, __pyx_L3_error)
6071
6279
  CYTHON_FALLTHROUGH;
6072
6280
  case 0: break;
6073
6281
  default: goto __pyx_L5_argtuple_error;
6074
6282
  }
6075
6283
  const Py_ssize_t kwd_pos_args = __pyx_nargs;
6076
- if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "curve_to_quadratic", 0) < 0) __PYX_ERR(0, 436, __pyx_L3_error)
6284
+ if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "curve_to_quadratic", 0) < 0) __PYX_ERR(0, 468, __pyx_L3_error)
6077
6285
  for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
6078
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("curve_to_quadratic", 0, 2, 3, i); __PYX_ERR(0, 436, __pyx_L3_error) }
6286
+ if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("curve_to_quadratic", 0, 2, 3, i); __PYX_ERR(0, 468, __pyx_L3_error) }
6079
6287
  }
6080
6288
  } else {
6081
6289
  switch (__pyx_nargs) {
6082
6290
  case 3:
6083
6291
  values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
6084
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 436, __pyx_L3_error)
6292
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 468, __pyx_L3_error)
6085
6293
  CYTHON_FALLTHROUGH;
6086
6294
  case 2:
6087
6295
  values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
6088
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 436, __pyx_L3_error)
6296
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 468, __pyx_L3_error)
6089
6297
  values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6090
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 436, __pyx_L3_error)
6298
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 468, __pyx_L3_error)
6091
6299
  break;
6092
6300
  default: goto __pyx_L5_argtuple_error;
6093
6301
  }
6094
6302
  }
6095
6303
  __pyx_v_curve = values[0];
6096
- __pyx_v_max_err = __Pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_max_err == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 439, __pyx_L3_error)
6304
+ __pyx_v_max_err = __Pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_max_err == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 471, __pyx_L3_error)
6097
6305
  if (values[2]) {
6098
- __pyx_v_all_quadratic = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_all_quadratic == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 439, __pyx_L3_error)
6306
+ __pyx_v_all_quadratic = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_all_quadratic == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 471, __pyx_L3_error)
6099
6307
  } else {
6100
6308
 
6101
- /* "fontTools/cu2qu/cu2qu.py":439
6309
+ /* "fontTools/cu2qu/cu2qu.py":471
6102
6310
  * @cython.locals(n=cython.int)
6103
6311
  * @cython.locals(all_quadratic=cython.int)
6104
6312
  * def curve_to_quadratic(curve, max_err, all_quadratic=True): # <<<<<<<<<<<<<<
@@ -6110,7 +6318,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
6110
6318
  }
6111
6319
  goto __pyx_L6_skip;
6112
6320
  __pyx_L5_argtuple_error:;
6113
- __Pyx_RaiseArgtupleInvalid("curve_to_quadratic", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 436, __pyx_L3_error)
6321
+ __Pyx_RaiseArgtupleInvalid("curve_to_quadratic", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 468, __pyx_L3_error)
6114
6322
  __pyx_L6_skip:;
6115
6323
  goto __pyx_L4_argument_unpacking_done;
6116
6324
  __pyx_L3_error:;
@@ -6123,7 +6331,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
6123
6331
  __pyx_L4_argument_unpacking_done:;
6124
6332
  __pyx_r = __pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(__pyx_self, __pyx_v_curve, __pyx_v_max_err, __pyx_v_all_quadratic);
6125
6333
 
6126
- /* "fontTools/cu2qu/cu2qu.py":436
6334
+ /* "fontTools/cu2qu/cu2qu.py":468
6127
6335
  *
6128
6336
  *
6129
6337
  * @cython.locals(max_err=cython.double) # <<<<<<<<<<<<<<
@@ -6164,7 +6372,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
6164
6372
  __Pyx_RefNannySetupContext("curve_to_quadratic", 0);
6165
6373
  __Pyx_INCREF(__pyx_v_curve);
6166
6374
 
6167
- /* "fontTools/cu2qu/cu2qu.py":460
6375
+ /* "fontTools/cu2qu/cu2qu.py":492
6168
6376
  * """
6169
6377
  *
6170
6378
  * curve = [complex(*p) for p in curve] # <<<<<<<<<<<<<<
@@ -6172,16 +6380,16 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
6172
6380
  * for n in range(1, MAX_N + 1):
6173
6381
  */
6174
6382
  { /* enter inner scope */
6175
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 460, __pyx_L5_error)
6383
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 492, __pyx_L5_error)
6176
6384
  __Pyx_GOTREF(__pyx_t_1);
6177
6385
  if (likely(PyList_CheckExact(__pyx_v_curve)) || PyTuple_CheckExact(__pyx_v_curve)) {
6178
6386
  __pyx_t_2 = __pyx_v_curve; __Pyx_INCREF(__pyx_t_2);
6179
6387
  __pyx_t_3 = 0;
6180
6388
  __pyx_t_4 = NULL;
6181
6389
  } else {
6182
- __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_curve); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 460, __pyx_L5_error)
6390
+ __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_curve); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 492, __pyx_L5_error)
6183
6391
  __Pyx_GOTREF(__pyx_t_2);
6184
- __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 460, __pyx_L5_error)
6392
+ __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 492, __pyx_L5_error)
6185
6393
  }
6186
6394
  for (;;) {
6187
6395
  if (likely(!__pyx_t_4)) {
@@ -6189,7 +6397,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
6189
6397
  {
6190
6398
  Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
6191
6399
  #if !CYTHON_ASSUME_SAFE_SIZE
6192
- if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 460, __pyx_L5_error)
6400
+ if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 492, __pyx_L5_error)
6193
6401
  #endif
6194
6402
  if (__pyx_t_3 >= __pyx_temp) break;
6195
6403
  }
@@ -6199,7 +6407,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
6199
6407
  {
6200
6408
  Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
6201
6409
  #if !CYTHON_ASSUME_SAFE_SIZE
6202
- if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 460, __pyx_L5_error)
6410
+ if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 492, __pyx_L5_error)
6203
6411
  #endif
6204
6412
  if (__pyx_t_3 >= __pyx_temp) break;
6205
6413
  }
@@ -6210,13 +6418,13 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
6210
6418
  #endif
6211
6419
  ++__pyx_t_3;
6212
6420
  }
6213
- if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 460, __pyx_L5_error)
6421
+ if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 492, __pyx_L5_error)
6214
6422
  } else {
6215
6423
  __pyx_t_5 = __pyx_t_4(__pyx_t_2);
6216
6424
  if (unlikely(!__pyx_t_5)) {
6217
6425
  PyObject* exc_type = PyErr_Occurred();
6218
6426
  if (exc_type) {
6219
- if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 460, __pyx_L5_error)
6427
+ if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 492, __pyx_L5_error)
6220
6428
  PyErr_Clear();
6221
6429
  }
6222
6430
  break;
@@ -6225,12 +6433,12 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
6225
6433
  __Pyx_GOTREF(__pyx_t_5);
6226
6434
  __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_p, __pyx_t_5);
6227
6435
  __pyx_t_5 = 0;
6228
- __pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_7genexpr__pyx_v_p); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 460, __pyx_L5_error)
6436
+ __pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_7genexpr__pyx_v_p); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 492, __pyx_L5_error)
6229
6437
  __Pyx_GOTREF(__pyx_t_5);
6230
- __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyComplex_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 460, __pyx_L5_error)
6438
+ __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyComplex_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 492, __pyx_L5_error)
6231
6439
  __Pyx_GOTREF(__pyx_t_6);
6232
6440
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6233
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 460, __pyx_L5_error)
6441
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 492, __pyx_L5_error)
6234
6442
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6235
6443
  }
6236
6444
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -6244,37 +6452,37 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
6244
6452
  __Pyx_DECREF_SET(__pyx_v_curve, __pyx_t_1);
6245
6453
  __pyx_t_1 = 0;
6246
6454
 
6247
- /* "fontTools/cu2qu/cu2qu.py":462
6455
+ /* "fontTools/cu2qu/cu2qu.py":494
6248
6456
  * curve = [complex(*p) for p in curve]
6249
6457
  *
6250
6458
  * for n in range(1, MAX_N + 1): # <<<<<<<<<<<<<<
6251
6459
  * spline = cubic_approx_spline(curve, n, max_err, all_quadratic)
6252
6460
  * if spline is not None:
6253
6461
  */
6254
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_MAX_N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 462, __pyx_L1_error)
6462
+ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_MAX_N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error)
6255
6463
  __Pyx_GOTREF(__pyx_t_1);
6256
- __pyx_t_2 = __Pyx_PyLong_AddObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L1_error)
6464
+ __pyx_t_2 = __Pyx_PyLong_AddObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 494, __pyx_L1_error)
6257
6465
  __Pyx_GOTREF(__pyx_t_2);
6258
6466
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6259
- __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 462, __pyx_L1_error)
6467
+ __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 494, __pyx_L1_error)
6260
6468
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6261
6469
  __pyx_t_7 = __pyx_t_3;
6262
6470
  for (__pyx_t_8 = 1; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
6263
6471
  __pyx_v_n = __pyx_t_8;
6264
6472
 
6265
- /* "fontTools/cu2qu/cu2qu.py":463
6473
+ /* "fontTools/cu2qu/cu2qu.py":495
6266
6474
  *
6267
6475
  * for n in range(1, MAX_N + 1):
6268
6476
  * spline = cubic_approx_spline(curve, n, max_err, all_quadratic) # <<<<<<<<<<<<<<
6269
6477
  * if spline is not None:
6270
6478
  * # done. go home
6271
6479
  */
6272
- __pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(__pyx_v_curve, __pyx_v_n, __pyx_v_max_err, __pyx_v_all_quadratic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error)
6480
+ __pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(__pyx_v_curve, __pyx_v_n, __pyx_v_max_err, __pyx_v_all_quadratic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 495, __pyx_L1_error)
6273
6481
  __Pyx_GOTREF(__pyx_t_2);
6274
6482
  __Pyx_XDECREF_SET(__pyx_v_spline, __pyx_t_2);
6275
6483
  __pyx_t_2 = 0;
6276
6484
 
6277
- /* "fontTools/cu2qu/cu2qu.py":464
6485
+ /* "fontTools/cu2qu/cu2qu.py":496
6278
6486
  * for n in range(1, MAX_N + 1):
6279
6487
  * spline = cubic_approx_spline(curve, n, max_err, all_quadratic)
6280
6488
  * if spline is not None: # <<<<<<<<<<<<<<
@@ -6284,7 +6492,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
6284
6492
  __pyx_t_9 = (__pyx_v_spline != Py_None);
6285
6493
  if (__pyx_t_9) {
6286
6494
 
6287
- /* "fontTools/cu2qu/cu2qu.py":466
6495
+ /* "fontTools/cu2qu/cu2qu.py":498
6288
6496
  * if spline is not None:
6289
6497
  * # done. go home
6290
6498
  * return [(s.real, s.imag) for s in spline] # <<<<<<<<<<<<<<
@@ -6293,16 +6501,16 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
6293
6501
  */
6294
6502
  __Pyx_XDECREF(__pyx_r);
6295
6503
  { /* enter inner scope */
6296
- __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 466, __pyx_L15_error)
6504
+ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 498, __pyx_L15_error)
6297
6505
  __Pyx_GOTREF(__pyx_t_2);
6298
6506
  if (likely(PyList_CheckExact(__pyx_v_spline)) || PyTuple_CheckExact(__pyx_v_spline)) {
6299
6507
  __pyx_t_1 = __pyx_v_spline; __Pyx_INCREF(__pyx_t_1);
6300
6508
  __pyx_t_10 = 0;
6301
6509
  __pyx_t_4 = NULL;
6302
6510
  } else {
6303
- __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_spline); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 466, __pyx_L15_error)
6511
+ __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_spline); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L15_error)
6304
6512
  __Pyx_GOTREF(__pyx_t_1);
6305
- __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 466, __pyx_L15_error)
6513
+ __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 498, __pyx_L15_error)
6306
6514
  }
6307
6515
  for (;;) {
6308
6516
  if (likely(!__pyx_t_4)) {
@@ -6310,7 +6518,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
6310
6518
  {
6311
6519
  Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
6312
6520
  #if !CYTHON_ASSUME_SAFE_SIZE
6313
- if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 466, __pyx_L15_error)
6521
+ if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 498, __pyx_L15_error)
6314
6522
  #endif
6315
6523
  if (__pyx_t_10 >= __pyx_temp) break;
6316
6524
  }
@@ -6320,7 +6528,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
6320
6528
  {
6321
6529
  Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
6322
6530
  #if !CYTHON_ASSUME_SAFE_SIZE
6323
- if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 466, __pyx_L15_error)
6531
+ if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 498, __pyx_L15_error)
6324
6532
  #endif
6325
6533
  if (__pyx_t_10 >= __pyx_temp) break;
6326
6534
  }
@@ -6331,13 +6539,13 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
6331
6539
  #endif
6332
6540
  ++__pyx_t_10;
6333
6541
  }
6334
- if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 466, __pyx_L15_error)
6542
+ if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 498, __pyx_L15_error)
6335
6543
  } else {
6336
6544
  __pyx_t_6 = __pyx_t_4(__pyx_t_1);
6337
6545
  if (unlikely(!__pyx_t_6)) {
6338
6546
  PyObject* exc_type = PyErr_Occurred();
6339
6547
  if (exc_type) {
6340
- if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 466, __pyx_L15_error)
6548
+ if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 498, __pyx_L15_error)
6341
6549
  PyErr_Clear();
6342
6550
  }
6343
6551
  break;
@@ -6346,19 +6554,19 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
6346
6554
  __Pyx_GOTREF(__pyx_t_6);
6347
6555
  __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_s, __pyx_t_6);
6348
6556
  __pyx_t_6 = 0;
6349
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr1__pyx_v_s, __pyx_mstate_global->__pyx_n_u_real); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 466, __pyx_L15_error)
6557
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr1__pyx_v_s, __pyx_mstate_global->__pyx_n_u_real); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 498, __pyx_L15_error)
6350
6558
  __Pyx_GOTREF(__pyx_t_6);
6351
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr1__pyx_v_s, __pyx_mstate_global->__pyx_n_u_imag); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 466, __pyx_L15_error)
6559
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr1__pyx_v_s, __pyx_mstate_global->__pyx_n_u_imag); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 498, __pyx_L15_error)
6352
6560
  __Pyx_GOTREF(__pyx_t_5);
6353
- __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 466, __pyx_L15_error)
6561
+ __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 498, __pyx_L15_error)
6354
6562
  __Pyx_GOTREF(__pyx_t_11);
6355
6563
  __Pyx_GIVEREF(__pyx_t_6);
6356
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 466, __pyx_L15_error);
6564
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 498, __pyx_L15_error);
6357
6565
  __Pyx_GIVEREF(__pyx_t_5);
6358
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_5) != (0)) __PYX_ERR(0, 466, __pyx_L15_error);
6566
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_5) != (0)) __PYX_ERR(0, 498, __pyx_L15_error);
6359
6567
  __pyx_t_6 = 0;
6360
6568
  __pyx_t_5 = 0;
6361
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 466, __pyx_L15_error)
6569
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 498, __pyx_L15_error)
6362
6570
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6363
6571
  }
6364
6572
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
@@ -6373,7 +6581,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
6373
6581
  __pyx_t_2 = 0;
6374
6582
  goto __pyx_L0;
6375
6583
 
6376
- /* "fontTools/cu2qu/cu2qu.py":464
6584
+ /* "fontTools/cu2qu/cu2qu.py":496
6377
6585
  * for n in range(1, MAX_N + 1):
6378
6586
  * spline = cubic_approx_spline(curve, n, max_err, all_quadratic)
6379
6587
  * if spline is not None: # <<<<<<<<<<<<<<
@@ -6383,7 +6591,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
6383
6591
  }
6384
6592
  }
6385
6593
 
6386
- /* "fontTools/cu2qu/cu2qu.py":468
6594
+ /* "fontTools/cu2qu/cu2qu.py":500
6387
6595
  * return [(s.real, s.imag) for s in spline]
6388
6596
  *
6389
6597
  * raise ApproxNotFoundError(curve) # <<<<<<<<<<<<<<
@@ -6391,7 +6599,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
6391
6599
  *
6392
6600
  */
6393
6601
  __pyx_t_1 = NULL;
6394
- __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_ApproxNotFoundError); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 468, __pyx_L1_error)
6602
+ __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_ApproxNotFoundError); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 500, __pyx_L1_error)
6395
6603
  __Pyx_GOTREF(__pyx_t_11);
6396
6604
  __pyx_t_12 = 1;
6397
6605
  #if CYTHON_UNPACK_METHODS
@@ -6410,14 +6618,14 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
6410
6618
  __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
6411
6619
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
6412
6620
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6413
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 468, __pyx_L1_error)
6621
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
6414
6622
  __Pyx_GOTREF(__pyx_t_2);
6415
6623
  }
6416
6624
  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
6417
6625
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6418
- __PYX_ERR(0, 468, __pyx_L1_error)
6626
+ __PYX_ERR(0, 500, __pyx_L1_error)
6419
6627
 
6420
- /* "fontTools/cu2qu/cu2qu.py":436
6628
+ /* "fontTools/cu2qu/cu2qu.py":468
6421
6629
  *
6422
6630
  *
6423
6631
  * @cython.locals(max_err=cython.double) # <<<<<<<<<<<<<<
@@ -6444,7 +6652,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
6444
6652
  return __pyx_r;
6445
6653
  }
6446
6654
 
6447
- /* "fontTools/cu2qu/cu2qu.py":471
6655
+ /* "fontTools/cu2qu/cu2qu.py":503
6448
6656
  *
6449
6657
  *
6450
6658
  * @cython.locals(l=cython.int, last_i=cython.int, i=cython.int) # <<<<<<<<<<<<<<
@@ -6494,40 +6702,40 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
6494
6702
  {
6495
6703
  PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_curves,&__pyx_mstate_global->__pyx_n_u_max_errors,&__pyx_mstate_global->__pyx_n_u_all_quadratic,0};
6496
6704
  const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
6497
- if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 471, __pyx_L3_error)
6705
+ if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 503, __pyx_L3_error)
6498
6706
  if (__pyx_kwds_len > 0) {
6499
6707
  switch (__pyx_nargs) {
6500
6708
  case 3:
6501
6709
  values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
6502
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 471, __pyx_L3_error)
6710
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 503, __pyx_L3_error)
6503
6711
  CYTHON_FALLTHROUGH;
6504
6712
  case 2:
6505
6713
  values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
6506
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 471, __pyx_L3_error)
6714
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 503, __pyx_L3_error)
6507
6715
  CYTHON_FALLTHROUGH;
6508
6716
  case 1:
6509
6717
  values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6510
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 471, __pyx_L3_error)
6718
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 503, __pyx_L3_error)
6511
6719
  CYTHON_FALLTHROUGH;
6512
6720
  case 0: break;
6513
6721
  default: goto __pyx_L5_argtuple_error;
6514
6722
  }
6515
6723
  const Py_ssize_t kwd_pos_args = __pyx_nargs;
6516
- if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "curves_to_quadratic", 0) < 0) __PYX_ERR(0, 471, __pyx_L3_error)
6724
+ if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "curves_to_quadratic", 0) < 0) __PYX_ERR(0, 503, __pyx_L3_error)
6517
6725
  for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
6518
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("curves_to_quadratic", 0, 2, 3, i); __PYX_ERR(0, 471, __pyx_L3_error) }
6726
+ if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("curves_to_quadratic", 0, 2, 3, i); __PYX_ERR(0, 503, __pyx_L3_error) }
6519
6727
  }
6520
6728
  } else {
6521
6729
  switch (__pyx_nargs) {
6522
6730
  case 3:
6523
6731
  values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
6524
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 471, __pyx_L3_error)
6732
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 503, __pyx_L3_error)
6525
6733
  CYTHON_FALLTHROUGH;
6526
6734
  case 2:
6527
6735
  values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
6528
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 471, __pyx_L3_error)
6736
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 503, __pyx_L3_error)
6529
6737
  values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
6530
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 471, __pyx_L3_error)
6738
+ if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 503, __pyx_L3_error)
6531
6739
  break;
6532
6740
  default: goto __pyx_L5_argtuple_error;
6533
6741
  }
@@ -6535,10 +6743,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
6535
6743
  __pyx_v_curves = values[0];
6536
6744
  __pyx_v_max_errors = values[1];
6537
6745
  if (values[2]) {
6538
- __pyx_v_all_quadratic = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_all_quadratic == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 473, __pyx_L3_error)
6746
+ __pyx_v_all_quadratic = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_all_quadratic == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 505, __pyx_L3_error)
6539
6747
  } else {
6540
6748
 
6541
- /* "fontTools/cu2qu/cu2qu.py":473
6749
+ /* "fontTools/cu2qu/cu2qu.py":505
6542
6750
  * @cython.locals(l=cython.int, last_i=cython.int, i=cython.int)
6543
6751
  * @cython.locals(all_quadratic=cython.int)
6544
6752
  * def curves_to_quadratic(curves, max_errors, all_quadratic=True): # <<<<<<<<<<<<<<
@@ -6550,7 +6758,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
6550
6758
  }
6551
6759
  goto __pyx_L6_skip;
6552
6760
  __pyx_L5_argtuple_error:;
6553
- __Pyx_RaiseArgtupleInvalid("curves_to_quadratic", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 471, __pyx_L3_error)
6761
+ __Pyx_RaiseArgtupleInvalid("curves_to_quadratic", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 503, __pyx_L3_error)
6554
6762
  __pyx_L6_skip:;
6555
6763
  goto __pyx_L4_argument_unpacking_done;
6556
6764
  __pyx_L3_error:;
@@ -6563,7 +6771,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
6563
6771
  __pyx_L4_argument_unpacking_done:;
6564
6772
  __pyx_r = __pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(__pyx_self, __pyx_v_curves, __pyx_v_max_errors, __pyx_v_all_quadratic);
6565
6773
 
6566
- /* "fontTools/cu2qu/cu2qu.py":471
6774
+ /* "fontTools/cu2qu/cu2qu.py":503
6567
6775
  *
6568
6776
  *
6569
6777
  * @cython.locals(l=cython.int, last_i=cython.int, i=cython.int) # <<<<<<<<<<<<<<
@@ -6614,7 +6822,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
6614
6822
  __Pyx_RefNannySetupContext("curves_to_quadratic", 0);
6615
6823
  __Pyx_INCREF(__pyx_v_curves);
6616
6824
 
6617
- /* "fontTools/cu2qu/cu2qu.py":510
6825
+ /* "fontTools/cu2qu/cu2qu.py":542
6618
6826
  * """
6619
6827
  *
6620
6828
  * curves = [[complex(*p) for p in curve] for curve in curves] # <<<<<<<<<<<<<<
@@ -6622,16 +6830,16 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
6622
6830
  *
6623
6831
  */
6624
6832
  { /* enter inner scope */
6625
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 510, __pyx_L5_error)
6833
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L5_error)
6626
6834
  __Pyx_GOTREF(__pyx_t_1);
6627
6835
  if (likely(PyList_CheckExact(__pyx_v_curves)) || PyTuple_CheckExact(__pyx_v_curves)) {
6628
6836
  __pyx_t_2 = __pyx_v_curves; __Pyx_INCREF(__pyx_t_2);
6629
6837
  __pyx_t_3 = 0;
6630
6838
  __pyx_t_4 = NULL;
6631
6839
  } else {
6632
- __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_curves); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 510, __pyx_L5_error)
6840
+ __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_curves); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 542, __pyx_L5_error)
6633
6841
  __Pyx_GOTREF(__pyx_t_2);
6634
- __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 510, __pyx_L5_error)
6842
+ __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 542, __pyx_L5_error)
6635
6843
  }
6636
6844
  for (;;) {
6637
6845
  if (likely(!__pyx_t_4)) {
@@ -6639,7 +6847,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
6639
6847
  {
6640
6848
  Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
6641
6849
  #if !CYTHON_ASSUME_SAFE_SIZE
6642
- if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 510, __pyx_L5_error)
6850
+ if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 542, __pyx_L5_error)
6643
6851
  #endif
6644
6852
  if (__pyx_t_3 >= __pyx_temp) break;
6645
6853
  }
@@ -6649,7 +6857,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
6649
6857
  {
6650
6858
  Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
6651
6859
  #if !CYTHON_ASSUME_SAFE_SIZE
6652
- if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 510, __pyx_L5_error)
6860
+ if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 542, __pyx_L5_error)
6653
6861
  #endif
6654
6862
  if (__pyx_t_3 >= __pyx_temp) break;
6655
6863
  }
@@ -6660,13 +6868,13 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
6660
6868
  #endif
6661
6869
  ++__pyx_t_3;
6662
6870
  }
6663
- if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 510, __pyx_L5_error)
6871
+ if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 542, __pyx_L5_error)
6664
6872
  } else {
6665
6873
  __pyx_t_5 = __pyx_t_4(__pyx_t_2);
6666
6874
  if (unlikely(!__pyx_t_5)) {
6667
6875
  PyObject* exc_type = PyErr_Occurred();
6668
6876
  if (exc_type) {
6669
- if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 510, __pyx_L5_error)
6877
+ if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 542, __pyx_L5_error)
6670
6878
  PyErr_Clear();
6671
6879
  }
6672
6880
  break;
@@ -6676,16 +6884,16 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
6676
6884
  __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_curve, __pyx_t_5);
6677
6885
  __pyx_t_5 = 0;
6678
6886
  { /* enter inner scope */
6679
- __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 510, __pyx_L10_error)
6887
+ __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 542, __pyx_L10_error)
6680
6888
  __Pyx_GOTREF(__pyx_t_5);
6681
6889
  if (likely(PyList_CheckExact(__pyx_8genexpr2__pyx_v_curve)) || PyTuple_CheckExact(__pyx_8genexpr2__pyx_v_curve)) {
6682
6890
  __pyx_t_6 = __pyx_8genexpr2__pyx_v_curve; __Pyx_INCREF(__pyx_t_6);
6683
6891
  __pyx_t_7 = 0;
6684
6892
  __pyx_t_8 = NULL;
6685
6893
  } else {
6686
- __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_8genexpr2__pyx_v_curve); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 510, __pyx_L10_error)
6894
+ __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_8genexpr2__pyx_v_curve); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 542, __pyx_L10_error)
6687
6895
  __Pyx_GOTREF(__pyx_t_6);
6688
- __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 510, __pyx_L10_error)
6896
+ __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 542, __pyx_L10_error)
6689
6897
  }
6690
6898
  for (;;) {
6691
6899
  if (likely(!__pyx_t_8)) {
@@ -6693,7 +6901,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
6693
6901
  {
6694
6902
  Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
6695
6903
  #if !CYTHON_ASSUME_SAFE_SIZE
6696
- if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 510, __pyx_L10_error)
6904
+ if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 542, __pyx_L10_error)
6697
6905
  #endif
6698
6906
  if (__pyx_t_7 >= __pyx_temp) break;
6699
6907
  }
@@ -6703,7 +6911,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
6703
6911
  {
6704
6912
  Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
6705
6913
  #if !CYTHON_ASSUME_SAFE_SIZE
6706
- if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 510, __pyx_L10_error)
6914
+ if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 542, __pyx_L10_error)
6707
6915
  #endif
6708
6916
  if (__pyx_t_7 >= __pyx_temp) break;
6709
6917
  }
@@ -6714,13 +6922,13 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
6714
6922
  #endif
6715
6923
  ++__pyx_t_7;
6716
6924
  }
6717
- if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 510, __pyx_L10_error)
6925
+ if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 542, __pyx_L10_error)
6718
6926
  } else {
6719
6927
  __pyx_t_9 = __pyx_t_8(__pyx_t_6);
6720
6928
  if (unlikely(!__pyx_t_9)) {
6721
6929
  PyObject* exc_type = PyErr_Occurred();
6722
6930
  if (exc_type) {
6723
- if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 510, __pyx_L10_error)
6931
+ if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 542, __pyx_L10_error)
6724
6932
  PyErr_Clear();
6725
6933
  }
6726
6934
  break;
@@ -6729,12 +6937,12 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
6729
6937
  __Pyx_GOTREF(__pyx_t_9);
6730
6938
  __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_p, __pyx_t_9);
6731
6939
  __pyx_t_9 = 0;
6732
- __pyx_t_9 = __Pyx_PySequence_Tuple(__pyx_8genexpr3__pyx_v_p); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 510, __pyx_L10_error)
6940
+ __pyx_t_9 = __Pyx_PySequence_Tuple(__pyx_8genexpr3__pyx_v_p); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 542, __pyx_L10_error)
6733
6941
  __Pyx_GOTREF(__pyx_t_9);
6734
- __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)(&PyComplex_Type)), __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 510, __pyx_L10_error)
6942
+ __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)(&PyComplex_Type)), __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 542, __pyx_L10_error)
6735
6943
  __Pyx_GOTREF(__pyx_t_10);
6736
6944
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6737
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 510, __pyx_L10_error)
6945
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 542, __pyx_L10_error)
6738
6946
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6739
6947
  }
6740
6948
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
@@ -6745,7 +6953,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
6745
6953
  goto __pyx_L5_error;
6746
6954
  __pyx_L14_exit_scope:;
6747
6955
  } /* exit inner scope */
6748
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 510, __pyx_L5_error)
6956
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 542, __pyx_L5_error)
6749
6957
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6750
6958
  }
6751
6959
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -6759,7 +6967,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
6759
6967
  __Pyx_DECREF_SET(__pyx_v_curves, __pyx_t_1);
6760
6968
  __pyx_t_1 = 0;
6761
6969
 
6762
- /* "fontTools/cu2qu/cu2qu.py":511
6970
+ /* "fontTools/cu2qu/cu2qu.py":543
6763
6971
  *
6764
6972
  * curves = [[complex(*p) for p in curve] for curve in curves]
6765
6973
  * assert len(max_errors) == len(curves) # <<<<<<<<<<<<<<
@@ -6768,48 +6976,48 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
6768
6976
  */
6769
6977
  #ifndef CYTHON_WITHOUT_ASSERTIONS
6770
6978
  if (unlikely(__pyx_assertions_enabled())) {
6771
- __pyx_t_3 = PyObject_Length(__pyx_v_max_errors); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 511, __pyx_L1_error)
6772
- __pyx_t_7 = PyObject_Length(__pyx_v_curves); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 511, __pyx_L1_error)
6979
+ __pyx_t_3 = PyObject_Length(__pyx_v_max_errors); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 543, __pyx_L1_error)
6980
+ __pyx_t_7 = PyObject_Length(__pyx_v_curves); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 543, __pyx_L1_error)
6773
6981
  __pyx_t_11 = (__pyx_t_3 == __pyx_t_7);
6774
6982
  if (unlikely(!__pyx_t_11)) {
6775
6983
  __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
6776
- __PYX_ERR(0, 511, __pyx_L1_error)
6984
+ __PYX_ERR(0, 543, __pyx_L1_error)
6777
6985
  }
6778
6986
  }
6779
6987
  #else
6780
- if ((1)); else __PYX_ERR(0, 511, __pyx_L1_error)
6988
+ if ((1)); else __PYX_ERR(0, 543, __pyx_L1_error)
6781
6989
  #endif
6782
6990
 
6783
- /* "fontTools/cu2qu/cu2qu.py":513
6991
+ /* "fontTools/cu2qu/cu2qu.py":545
6784
6992
  * assert len(max_errors) == len(curves)
6785
6993
  *
6786
6994
  * l = len(curves) # <<<<<<<<<<<<<<
6787
6995
  * splines = [None] * l
6788
6996
  * last_i = i = 0
6789
6997
  */
6790
- __pyx_t_7 = PyObject_Length(__pyx_v_curves); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 513, __pyx_L1_error)
6998
+ __pyx_t_7 = PyObject_Length(__pyx_v_curves); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 545, __pyx_L1_error)
6791
6999
  __pyx_v_l = __pyx_t_7;
6792
7000
 
6793
- /* "fontTools/cu2qu/cu2qu.py":514
7001
+ /* "fontTools/cu2qu/cu2qu.py":546
6794
7002
  *
6795
7003
  * l = len(curves)
6796
7004
  * splines = [None] * l # <<<<<<<<<<<<<<
6797
7005
  * last_i = i = 0
6798
7006
  * n = 1
6799
7007
  */
6800
- __pyx_t_1 = PyList_New(1 * ((__pyx_v_l<0) ? 0:__pyx_v_l)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error)
7008
+ __pyx_t_1 = PyList_New(1 * ((__pyx_v_l<0) ? 0:__pyx_v_l)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error)
6801
7009
  __Pyx_GOTREF(__pyx_t_1);
6802
7010
  { Py_ssize_t __pyx_temp;
6803
7011
  for (__pyx_temp=0; __pyx_temp < __pyx_v_l; __pyx_temp++) {
6804
7012
  __Pyx_INCREF(Py_None);
6805
7013
  __Pyx_GIVEREF(Py_None);
6806
- if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, Py_None) != (0)) __PYX_ERR(0, 514, __pyx_L1_error);
7014
+ if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, Py_None) != (0)) __PYX_ERR(0, 546, __pyx_L1_error);
6807
7015
  }
6808
7016
  }
6809
7017
  __pyx_v_splines = ((PyObject*)__pyx_t_1);
6810
7018
  __pyx_t_1 = 0;
6811
7019
 
6812
- /* "fontTools/cu2qu/cu2qu.py":515
7020
+ /* "fontTools/cu2qu/cu2qu.py":547
6813
7021
  * l = len(curves)
6814
7022
  * splines = [None] * l
6815
7023
  * last_i = i = 0 # <<<<<<<<<<<<<<
@@ -6819,7 +7027,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
6819
7027
  __pyx_v_last_i = 0;
6820
7028
  __pyx_v_i = 0;
6821
7029
 
6822
- /* "fontTools/cu2qu/cu2qu.py":516
7030
+ /* "fontTools/cu2qu/cu2qu.py":548
6823
7031
  * splines = [None] * l
6824
7032
  * last_i = i = 0
6825
7033
  * n = 1 # <<<<<<<<<<<<<<
@@ -6829,7 +7037,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
6829
7037
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1);
6830
7038
  __pyx_v_n = __pyx_mstate_global->__pyx_int_1;
6831
7039
 
6832
- /* "fontTools/cu2qu/cu2qu.py":517
7040
+ /* "fontTools/cu2qu/cu2qu.py":549
6833
7041
  * last_i = i = 0
6834
7042
  * n = 1
6835
7043
  * while True: # <<<<<<<<<<<<<<
@@ -6838,27 +7046,27 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
6838
7046
  */
6839
7047
  while (1) {
6840
7048
 
6841
- /* "fontTools/cu2qu/cu2qu.py":518
7049
+ /* "fontTools/cu2qu/cu2qu.py":550
6842
7050
  * n = 1
6843
7051
  * while True:
6844
7052
  * spline = cubic_approx_spline(curves[i], n, max_errors[i], all_quadratic) # <<<<<<<<<<<<<<
6845
7053
  * if spline is None:
6846
7054
  * if n == MAX_N:
6847
7055
  */
6848
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_curves, __pyx_v_i, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error)
7056
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_curves, __pyx_v_i, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error)
6849
7057
  __Pyx_GOTREF(__pyx_t_1);
6850
- __pyx_t_12 = __Pyx_PyLong_As_int(__pyx_v_n); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 518, __pyx_L1_error)
6851
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_max_errors, __pyx_v_i, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L1_error)
7058
+ __pyx_t_12 = __Pyx_PyLong_As_int(__pyx_v_n); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 550, __pyx_L1_error)
7059
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_max_errors, __pyx_v_i, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 550, __pyx_L1_error)
6852
7060
  __Pyx_GOTREF(__pyx_t_2);
6853
- __pyx_t_13 = __Pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 518, __pyx_L1_error)
7061
+ __pyx_t_13 = __Pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 550, __pyx_L1_error)
6854
7062
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6855
- __pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(__pyx_t_1, __pyx_t_12, __pyx_t_13, __pyx_v_all_quadratic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L1_error)
7063
+ __pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(__pyx_t_1, __pyx_t_12, __pyx_t_13, __pyx_v_all_quadratic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 550, __pyx_L1_error)
6856
7064
  __Pyx_GOTREF(__pyx_t_2);
6857
7065
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6858
7066
  __Pyx_XDECREF_SET(__pyx_v_spline, __pyx_t_2);
6859
7067
  __pyx_t_2 = 0;
6860
7068
 
6861
- /* "fontTools/cu2qu/cu2qu.py":519
7069
+ /* "fontTools/cu2qu/cu2qu.py":551
6862
7070
  * while True:
6863
7071
  * spline = cubic_approx_spline(curves[i], n, max_errors[i], all_quadratic)
6864
7072
  * if spline is None: # <<<<<<<<<<<<<<
@@ -6868,22 +7076,22 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
6868
7076
  __pyx_t_11 = (__pyx_v_spline == Py_None);
6869
7077
  if (__pyx_t_11) {
6870
7078
 
6871
- /* "fontTools/cu2qu/cu2qu.py":520
7079
+ /* "fontTools/cu2qu/cu2qu.py":552
6872
7080
  * spline = cubic_approx_spline(curves[i], n, max_errors[i], all_quadratic)
6873
7081
  * if spline is None:
6874
7082
  * if n == MAX_N: # <<<<<<<<<<<<<<
6875
7083
  * break
6876
7084
  * n += 1
6877
7085
  */
6878
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_MAX_N); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 520, __pyx_L1_error)
7086
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_MAX_N); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 552, __pyx_L1_error)
6879
7087
  __Pyx_GOTREF(__pyx_t_2);
6880
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_n, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error)
7088
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_n, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error)
6881
7089
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6882
- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 520, __pyx_L1_error)
7090
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 552, __pyx_L1_error)
6883
7091
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6884
7092
  if (__pyx_t_11) {
6885
7093
 
6886
- /* "fontTools/cu2qu/cu2qu.py":521
7094
+ /* "fontTools/cu2qu/cu2qu.py":553
6887
7095
  * if spline is None:
6888
7096
  * if n == MAX_N:
6889
7097
  * break # <<<<<<<<<<<<<<
@@ -6892,7 +7100,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
6892
7100
  */
6893
7101
  goto __pyx_L18_break;
6894
7102
 
6895
- /* "fontTools/cu2qu/cu2qu.py":520
7103
+ /* "fontTools/cu2qu/cu2qu.py":552
6896
7104
  * spline = cubic_approx_spline(curves[i], n, max_errors[i], all_quadratic)
6897
7105
  * if spline is None:
6898
7106
  * if n == MAX_N: # <<<<<<<<<<<<<<
@@ -6901,19 +7109,19 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
6901
7109
  */
6902
7110
  }
6903
7111
 
6904
- /* "fontTools/cu2qu/cu2qu.py":522
7112
+ /* "fontTools/cu2qu/cu2qu.py":554
6905
7113
  * if n == MAX_N:
6906
7114
  * break
6907
7115
  * n += 1 # <<<<<<<<<<<<<<
6908
7116
  * last_i = i
6909
7117
  * continue
6910
7118
  */
6911
- __pyx_t_1 = __Pyx_PyLong_AddObjC(__pyx_v_n, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L1_error)
7119
+ __pyx_t_1 = __Pyx_PyLong_AddObjC(__pyx_v_n, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
6912
7120
  __Pyx_GOTREF(__pyx_t_1);
6913
7121
  __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_1);
6914
7122
  __pyx_t_1 = 0;
6915
7123
 
6916
- /* "fontTools/cu2qu/cu2qu.py":523
7124
+ /* "fontTools/cu2qu/cu2qu.py":555
6917
7125
  * break
6918
7126
  * n += 1
6919
7127
  * last_i = i # <<<<<<<<<<<<<<
@@ -6922,7 +7130,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
6922
7130
  */
6923
7131
  __pyx_v_last_i = __pyx_v_i;
6924
7132
 
6925
- /* "fontTools/cu2qu/cu2qu.py":524
7133
+ /* "fontTools/cu2qu/cu2qu.py":556
6926
7134
  * n += 1
6927
7135
  * last_i = i
6928
7136
  * continue # <<<<<<<<<<<<<<
@@ -6931,7 +7139,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
6931
7139
  */
6932
7140
  goto __pyx_L17_continue;
6933
7141
 
6934
- /* "fontTools/cu2qu/cu2qu.py":519
7142
+ /* "fontTools/cu2qu/cu2qu.py":551
6935
7143
  * while True:
6936
7144
  * spline = cubic_approx_spline(curves[i], n, max_errors[i], all_quadratic)
6937
7145
  * if spline is None: # <<<<<<<<<<<<<<
@@ -6940,16 +7148,16 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
6940
7148
  */
6941
7149
  }
6942
7150
 
6943
- /* "fontTools/cu2qu/cu2qu.py":525
7151
+ /* "fontTools/cu2qu/cu2qu.py":557
6944
7152
  * last_i = i
6945
7153
  * continue
6946
7154
  * splines[i] = spline # <<<<<<<<<<<<<<
6947
7155
  * i = (i + 1) % l
6948
7156
  * if i == last_i:
6949
7157
  */
6950
- if (unlikely((__Pyx_SetItemInt(__pyx_v_splines, __pyx_v_i, __pyx_v_spline, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1) < 0))) __PYX_ERR(0, 525, __pyx_L1_error)
7158
+ if (unlikely((__Pyx_SetItemInt(__pyx_v_splines, __pyx_v_i, __pyx_v_spline, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1) < 0))) __PYX_ERR(0, 557, __pyx_L1_error)
6951
7159
 
6952
- /* "fontTools/cu2qu/cu2qu.py":526
7160
+ /* "fontTools/cu2qu/cu2qu.py":558
6953
7161
  * continue
6954
7162
  * splines[i] = spline
6955
7163
  * i = (i + 1) % l # <<<<<<<<<<<<<<
@@ -6959,11 +7167,11 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
6959
7167
  __pyx_t_14 = (__pyx_v_i + 1);
6960
7168
  if (unlikely(__pyx_v_l == 0)) {
6961
7169
  PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
6962
- __PYX_ERR(0, 526, __pyx_L1_error)
7170
+ __PYX_ERR(0, 558, __pyx_L1_error)
6963
7171
  }
6964
7172
  __pyx_v_i = __Pyx_mod_long(__pyx_t_14, __pyx_v_l, 0);
6965
7173
 
6966
- /* "fontTools/cu2qu/cu2qu.py":527
7174
+ /* "fontTools/cu2qu/cu2qu.py":559
6967
7175
  * splines[i] = spline
6968
7176
  * i = (i + 1) % l
6969
7177
  * if i == last_i: # <<<<<<<<<<<<<<
@@ -6973,7 +7181,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
6973
7181
  __pyx_t_11 = (__pyx_v_i == __pyx_v_last_i);
6974
7182
  if (__pyx_t_11) {
6975
7183
 
6976
- /* "fontTools/cu2qu/cu2qu.py":529
7184
+ /* "fontTools/cu2qu/cu2qu.py":561
6977
7185
  * if i == last_i:
6978
7186
  * # done. go home
6979
7187
  * return [[(s.real, s.imag) for s in spline] for spline in splines] # <<<<<<<<<<<<<<
@@ -6982,7 +7190,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
6982
7190
  */
6983
7191
  __Pyx_XDECREF(__pyx_r);
6984
7192
  { /* enter inner scope */
6985
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L24_error)
7193
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L24_error)
6986
7194
  __Pyx_GOTREF(__pyx_t_1);
6987
7195
  __pyx_t_2 = __pyx_v_splines; __Pyx_INCREF(__pyx_t_2);
6988
7196
  __pyx_t_7 = 0;
@@ -6990,27 +7198,27 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
6990
7198
  {
6991
7199
  Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
6992
7200
  #if !CYTHON_ASSUME_SAFE_SIZE
6993
- if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 529, __pyx_L24_error)
7201
+ if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 561, __pyx_L24_error)
6994
7202
  #endif
6995
7203
  if (__pyx_t_7 >= __pyx_temp) break;
6996
7204
  }
6997
7205
  __pyx_t_5 = __Pyx_PyList_GetItemRef(__pyx_t_2, __pyx_t_7);
6998
7206
  ++__pyx_t_7;
6999
- if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 529, __pyx_L24_error)
7207
+ if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 561, __pyx_L24_error)
7000
7208
  __Pyx_GOTREF(__pyx_t_5);
7001
7209
  __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_spline, __pyx_t_5);
7002
7210
  __pyx_t_5 = 0;
7003
7211
  { /* enter inner scope */
7004
- __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 529, __pyx_L29_error)
7212
+ __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 561, __pyx_L29_error)
7005
7213
  __Pyx_GOTREF(__pyx_t_5);
7006
7214
  if (likely(PyList_CheckExact(__pyx_8genexpr4__pyx_v_spline)) || PyTuple_CheckExact(__pyx_8genexpr4__pyx_v_spline)) {
7007
7215
  __pyx_t_6 = __pyx_8genexpr4__pyx_v_spline; __Pyx_INCREF(__pyx_t_6);
7008
7216
  __pyx_t_3 = 0;
7009
7217
  __pyx_t_4 = NULL;
7010
7218
  } else {
7011
- __pyx_t_3 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_8genexpr4__pyx_v_spline); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 529, __pyx_L29_error)
7219
+ __pyx_t_3 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_8genexpr4__pyx_v_spline); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 561, __pyx_L29_error)
7012
7220
  __Pyx_GOTREF(__pyx_t_6);
7013
- __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 529, __pyx_L29_error)
7221
+ __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 561, __pyx_L29_error)
7014
7222
  }
7015
7223
  for (;;) {
7016
7224
  if (likely(!__pyx_t_4)) {
@@ -7018,7 +7226,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
7018
7226
  {
7019
7227
  Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
7020
7228
  #if !CYTHON_ASSUME_SAFE_SIZE
7021
- if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 529, __pyx_L29_error)
7229
+ if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 561, __pyx_L29_error)
7022
7230
  #endif
7023
7231
  if (__pyx_t_3 >= __pyx_temp) break;
7024
7232
  }
@@ -7028,7 +7236,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
7028
7236
  {
7029
7237
  Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
7030
7238
  #if !CYTHON_ASSUME_SAFE_SIZE
7031
- if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 529, __pyx_L29_error)
7239
+ if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 561, __pyx_L29_error)
7032
7240
  #endif
7033
7241
  if (__pyx_t_3 >= __pyx_temp) break;
7034
7242
  }
@@ -7039,13 +7247,13 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
7039
7247
  #endif
7040
7248
  ++__pyx_t_3;
7041
7249
  }
7042
- if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 529, __pyx_L29_error)
7250
+ if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 561, __pyx_L29_error)
7043
7251
  } else {
7044
7252
  __pyx_t_10 = __pyx_t_4(__pyx_t_6);
7045
7253
  if (unlikely(!__pyx_t_10)) {
7046
7254
  PyObject* exc_type = PyErr_Occurred();
7047
7255
  if (exc_type) {
7048
- if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 529, __pyx_L29_error)
7256
+ if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 561, __pyx_L29_error)
7049
7257
  PyErr_Clear();
7050
7258
  }
7051
7259
  break;
@@ -7054,19 +7262,19 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
7054
7262
  __Pyx_GOTREF(__pyx_t_10);
7055
7263
  __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_s, __pyx_t_10);
7056
7264
  __pyx_t_10 = 0;
7057
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr5__pyx_v_s, __pyx_mstate_global->__pyx_n_u_real); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 529, __pyx_L29_error)
7265
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr5__pyx_v_s, __pyx_mstate_global->__pyx_n_u_real); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 561, __pyx_L29_error)
7058
7266
  __Pyx_GOTREF(__pyx_t_10);
7059
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr5__pyx_v_s, __pyx_mstate_global->__pyx_n_u_imag); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 529, __pyx_L29_error)
7267
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr5__pyx_v_s, __pyx_mstate_global->__pyx_n_u_imag); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 561, __pyx_L29_error)
7060
7268
  __Pyx_GOTREF(__pyx_t_9);
7061
- __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 529, __pyx_L29_error)
7269
+ __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 561, __pyx_L29_error)
7062
7270
  __Pyx_GOTREF(__pyx_t_15);
7063
7271
  __Pyx_GIVEREF(__pyx_t_10);
7064
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_10) != (0)) __PYX_ERR(0, 529, __pyx_L29_error);
7272
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_10) != (0)) __PYX_ERR(0, 561, __pyx_L29_error);
7065
7273
  __Pyx_GIVEREF(__pyx_t_9);
7066
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_9) != (0)) __PYX_ERR(0, 529, __pyx_L29_error);
7274
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_9) != (0)) __PYX_ERR(0, 561, __pyx_L29_error);
7067
7275
  __pyx_t_10 = 0;
7068
7276
  __pyx_t_9 = 0;
7069
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_15))) __PYX_ERR(0, 529, __pyx_L29_error)
7277
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_15))) __PYX_ERR(0, 561, __pyx_L29_error)
7070
7278
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7071
7279
  }
7072
7280
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
@@ -7077,7 +7285,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
7077
7285
  goto __pyx_L24_error;
7078
7286
  __pyx_L33_exit_scope:;
7079
7287
  } /* exit inner scope */
7080
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 529, __pyx_L24_error)
7288
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 561, __pyx_L24_error)
7081
7289
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7082
7290
  }
7083
7291
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -7092,7 +7300,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
7092
7300
  __pyx_t_1 = 0;
7093
7301
  goto __pyx_L0;
7094
7302
 
7095
- /* "fontTools/cu2qu/cu2qu.py":527
7303
+ /* "fontTools/cu2qu/cu2qu.py":559
7096
7304
  * splines[i] = spline
7097
7305
  * i = (i + 1) % l
7098
7306
  * if i == last_i: # <<<<<<<<<<<<<<
@@ -7104,13 +7312,13 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
7104
7312
  }
7105
7313
  __pyx_L18_break:;
7106
7314
 
7107
- /* "fontTools/cu2qu/cu2qu.py":531
7315
+ /* "fontTools/cu2qu/cu2qu.py":563
7108
7316
  * return [[(s.real, s.imag) for s in spline] for spline in splines]
7109
7317
  *
7110
7318
  * raise ApproxNotFoundError(curves) # <<<<<<<<<<<<<<
7111
7319
  */
7112
7320
  __pyx_t_2 = NULL;
7113
- __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ApproxNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 531, __pyx_L1_error)
7321
+ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ApproxNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 563, __pyx_L1_error)
7114
7322
  __Pyx_GOTREF(__pyx_t_5);
7115
7323
  __pyx_t_16 = 1;
7116
7324
  #if CYTHON_UNPACK_METHODS
@@ -7129,14 +7337,14 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
7129
7337
  __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_16, (2-__pyx_t_16) | (__pyx_t_16*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
7130
7338
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
7131
7339
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7132
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 531, __pyx_L1_error)
7340
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error)
7133
7341
  __Pyx_GOTREF(__pyx_t_1);
7134
7342
  }
7135
7343
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7136
7344
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7137
- __PYX_ERR(0, 531, __pyx_L1_error)
7345
+ __PYX_ERR(0, 563, __pyx_L1_error)
7138
7346
 
7139
- /* "fontTools/cu2qu/cu2qu.py":471
7347
+ /* "fontTools/cu2qu/cu2qu.py":503
7140
7348
  *
7141
7349
  *
7142
7350
  * @cython.locals(l=cython.int, last_i=cython.int, i=cython.int) # <<<<<<<<<<<<<<
@@ -7362,15 +7570,15 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) {
7362
7570
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
7363
7571
  /*--- Type init code ---*/
7364
7572
  #if CYTHON_USE_TYPE_SPECS
7365
- __pyx_mstate->__pyx_ptype_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen)) __PYX_ERR(0, 124, __pyx_L1_error)
7366
- if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen_spec, __pyx_mstate->__pyx_ptype_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
7573
+ __pyx_mstate->__pyx_ptype_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen)) __PYX_ERR(0, 150, __pyx_L1_error)
7574
+ if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen_spec, __pyx_mstate->__pyx_ptype_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
7367
7575
  #else
7368
7576
  __pyx_mstate->__pyx_ptype_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen = &__pyx_type_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen;
7369
7577
  #endif
7370
7578
  #if !CYTHON_COMPILING_IN_LIMITED_API
7371
7579
  #endif
7372
7580
  #if !CYTHON_USE_TYPE_SPECS
7373
- if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
7581
+ if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
7374
7582
  #endif
7375
7583
  #if !CYTHON_COMPILING_IN_LIMITED_API
7376
7584
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen->tp_dictoffset && __pyx_mstate->__pyx_ptype_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen->tp_getattro == PyObject_GenericGetAttr)) {
@@ -7795,70 +8003,70 @@ __Pyx_RefNannySetupContext("PyInit_cu2qu", 0);
7795
8003
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_NAN, __pyx_t_5) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
7796
8004
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7797
8005
 
7798
- /* "fontTools/cu2qu/cu2qu.py":124
8006
+ /* "fontTools/cu2qu/cu2qu.py":150
7799
8007
  *
7800
8008
  *
7801
8009
  * @cython.locals( # <<<<<<<<<<<<<<
7802
8010
  * p0=cython.complex,
7803
8011
  * p1=cython.complex,
7804
8012
  */
7805
- __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_5cu2qu_5cu2qu_1_split_cubic_into_n_gen, 0, __pyx_mstate_global->__pyx_n_u_split_cubic_into_n_gen, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_cu2qu_cu2qu, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 124, __pyx_L1_error)
8013
+ __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_5cu2qu_5cu2qu_1_split_cubic_into_n_gen, 0, __pyx_mstate_global->__pyx_n_u_split_cubic_into_n_gen, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_cu2qu_cu2qu, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 150, __pyx_L1_error)
7806
8014
  __Pyx_GOTREF(__pyx_t_5);
7807
- if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_split_cubic_into_n_gen, __pyx_t_5) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
8015
+ if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_split_cubic_into_n_gen, __pyx_t_5) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
7808
8016
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7809
8017
 
7810
- /* "fontTools/cu2qu/cu2qu.py":439
8018
+ /* "fontTools/cu2qu/cu2qu.py":471
7811
8019
  * @cython.locals(n=cython.int)
7812
8020
  * @cython.locals(all_quadratic=cython.int)
7813
8021
  * def curve_to_quadratic(curve, max_err, all_quadratic=True): # <<<<<<<<<<<<<<
7814
8022
  * """Approximate a cubic Bezier curve with a spline of n quadratics.
7815
8023
  *
7816
8024
  */
7817
- __pyx_t_5 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 439, __pyx_L1_error)
8025
+ __pyx_t_5 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 471, __pyx_L1_error)
7818
8026
  __Pyx_GOTREF(__pyx_t_5);
7819
8027
 
7820
- /* "fontTools/cu2qu/cu2qu.py":436
8028
+ /* "fontTools/cu2qu/cu2qu.py":468
7821
8029
  *
7822
8030
  *
7823
8031
  * @cython.locals(max_err=cython.double) # <<<<<<<<<<<<<<
7824
8032
  * @cython.locals(n=cython.int)
7825
8033
  * @cython.locals(all_quadratic=cython.int)
7826
8034
  */
7827
- __pyx_t_4 = PyTuple_Pack(1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 436, __pyx_L1_error)
8035
+ __pyx_t_4 = PyTuple_Pack(1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 468, __pyx_L1_error)
7828
8036
  __Pyx_GOTREF(__pyx_t_4);
7829
8037
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7830
- __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_5cu2qu_5cu2qu_4curve_to_quadratic, 0, __pyx_mstate_global->__pyx_n_u_curve_to_quadratic, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_cu2qu_cu2qu, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 436, __pyx_L1_error)
8038
+ __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_5cu2qu_5cu2qu_4curve_to_quadratic, 0, __pyx_mstate_global->__pyx_n_u_curve_to_quadratic, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_cu2qu_cu2qu, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 468, __pyx_L1_error)
7831
8039
  __Pyx_GOTREF(__pyx_t_5);
7832
8040
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_t_4);
7833
8041
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7834
- if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_curve_to_quadratic, __pyx_t_5) < 0) __PYX_ERR(0, 436, __pyx_L1_error)
8042
+ if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_curve_to_quadratic, __pyx_t_5) < 0) __PYX_ERR(0, 468, __pyx_L1_error)
7835
8043
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7836
8044
 
7837
- /* "fontTools/cu2qu/cu2qu.py":473
8045
+ /* "fontTools/cu2qu/cu2qu.py":505
7838
8046
  * @cython.locals(l=cython.int, last_i=cython.int, i=cython.int)
7839
8047
  * @cython.locals(all_quadratic=cython.int)
7840
8048
  * def curves_to_quadratic(curves, max_errors, all_quadratic=True): # <<<<<<<<<<<<<<
7841
8049
  * """Return quadratic Bezier splines approximating the input cubic Beziers.
7842
8050
  *
7843
8051
  */
7844
- __pyx_t_5 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 473, __pyx_L1_error)
8052
+ __pyx_t_5 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 505, __pyx_L1_error)
7845
8053
  __Pyx_GOTREF(__pyx_t_5);
7846
8054
 
7847
- /* "fontTools/cu2qu/cu2qu.py":471
8055
+ /* "fontTools/cu2qu/cu2qu.py":503
7848
8056
  *
7849
8057
  *
7850
8058
  * @cython.locals(l=cython.int, last_i=cython.int, i=cython.int) # <<<<<<<<<<<<<<
7851
8059
  * @cython.locals(all_quadratic=cython.int)
7852
8060
  * def curves_to_quadratic(curves, max_errors, all_quadratic=True):
7853
8061
  */
7854
- __pyx_t_4 = PyTuple_Pack(1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 471, __pyx_L1_error)
8062
+ __pyx_t_4 = PyTuple_Pack(1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 503, __pyx_L1_error)
7855
8063
  __Pyx_GOTREF(__pyx_t_4);
7856
8064
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7857
- __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_5cu2qu_5cu2qu_6curves_to_quadratic, 0, __pyx_mstate_global->__pyx_n_u_curves_to_quadratic, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_cu2qu_cu2qu, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 471, __pyx_L1_error)
8065
+ __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_5cu2qu_5cu2qu_6curves_to_quadratic, 0, __pyx_mstate_global->__pyx_n_u_curves_to_quadratic, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_cu2qu_cu2qu, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 503, __pyx_L1_error)
7858
8066
  __Pyx_GOTREF(__pyx_t_5);
7859
8067
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_t_4);
7860
8068
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7861
- if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_curves_to_quadratic, __pyx_t_5) < 0) __PYX_ERR(0, 471, __pyx_L1_error)
8069
+ if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_curves_to_quadratic, __pyx_t_5) < 0) __PYX_ERR(0, 503, __pyx_L1_error)
7862
8070
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7863
8071
 
7864
8072
  /* "fontTools/cu2qu/cu2qu.py":1
@@ -7868,7 +8076,7 @@ __Pyx_RefNannySetupContext("PyInit_cu2qu", 0);
7868
8076
  */
7869
8077
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1, __pyx_L1_error)
7870
8078
  __Pyx_GOTREF(__pyx_t_5);
7871
- if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_curves_to_quadratic_line_471, __pyx_mstate_global->__pyx_kp_u_Return_quadratic_Bezier_splines) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
8079
+ if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_curves_to_quadratic_line_503, __pyx_mstate_global->__pyx_kp_u_Return_quadratic_Bezier_splines) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
7872
8080
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_5) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
7873
8081
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7874
8082
 
@@ -7961,7 +8169,7 @@ static const __Pyx_StringTabEntry __pyx_string_tab[] = {
7961
8169
  {__pyx_k_curve_to_quadratic, sizeof(__pyx_k_curve_to_quadratic), 0, 1, 1}, /* PyObject cname: __pyx_n_u_curve_to_quadratic */
7962
8170
  {__pyx_k_curves, sizeof(__pyx_k_curves), 0, 1, 1}, /* PyObject cname: __pyx_n_u_curves */
7963
8171
  {__pyx_k_curves_to_quadratic, sizeof(__pyx_k_curves_to_quadratic), 0, 1, 1}, /* PyObject cname: __pyx_n_u_curves_to_quadratic */
7964
- {__pyx_k_curves_to_quadratic_line_471, sizeof(__pyx_k_curves_to_quadratic_line_471), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_curves_to_quadratic_line_471 */
8172
+ {__pyx_k_curves_to_quadratic_line_503, sizeof(__pyx_k_curves_to_quadratic_line_503), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_curves_to_quadratic_line_503 */
7965
8173
  {__pyx_k_d, sizeof(__pyx_k_d), 0, 1, 1}, /* PyObject cname: __pyx_n_u_d */
7966
8174
  {__pyx_k_d1, sizeof(__pyx_k_d1), 0, 1, 1}, /* PyObject cname: __pyx_n_u_d1 */
7967
8175
  {__pyx_k_delta_2, sizeof(__pyx_k_delta_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_delta_2 */
@@ -8021,9 +8229,9 @@ static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) {
8021
8229
  CYTHON_UNUSED_VAR(__pyx_mstate);
8022
8230
  __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 20, __pyx_L1_error)
8023
8231
  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 20, __pyx_L1_error)
8024
- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_range); if (!__pyx_builtin_range) __PYX_ERR(0, 143, __pyx_L1_error)
8025
- __pyx_builtin_ZeroDivisionError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_ZeroDivisionError); if (!__pyx_builtin_ZeroDivisionError) __PYX_ERR(0, 275, __pyx_L1_error)
8026
- __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(0, 511, __pyx_L1_error)
8232
+ __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_range); if (!__pyx_builtin_range) __PYX_ERR(0, 169, __pyx_L1_error)
8233
+ __pyx_builtin_ZeroDivisionError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_ZeroDivisionError); if (!__pyx_builtin_ZeroDivisionError) __PYX_ERR(0, 301, __pyx_L1_error)
8234
+ __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(0, 543, __pyx_L1_error)
8027
8235
  return 0;
8028
8236
  __pyx_L1_error:;
8029
8237
  return -1;
@@ -8055,15 +8263,16 @@ static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) {
8055
8263
  return -1;
8056
8264
  }
8057
8265
  /* #### Code section: init_codeobjects ### */
8058
- typedef struct {
8059
- unsigned int argcount : 3;
8060
- unsigned int num_posonly_args : 1;
8061
- unsigned int num_kwonly_args : 1;
8062
- unsigned int nlocals : 5;
8063
- unsigned int flags : 10;
8064
- unsigned int first_line : 9;
8065
- unsigned int line_table_length : 13;
8066
- } __Pyx_PyCode_New_function_description;
8266
+ \
8267
+ typedef struct {
8268
+ unsigned int argcount : 3;
8269
+ unsigned int num_posonly_args : 1;
8270
+ unsigned int num_kwonly_args : 1;
8271
+ unsigned int nlocals : 5;
8272
+ unsigned int flags : 10;
8273
+ unsigned int first_line : 9;
8274
+ unsigned int line_table_length : 13;
8275
+ } __Pyx_PyCode_New_function_description;
8067
8276
  /* NewCodeObj.proto */
8068
8277
  static PyObject* __Pyx_PyCode_New(
8069
8278
  const __Pyx_PyCode_New_function_description descr,
@@ -8079,17 +8288,17 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) {
8079
8288
  PyObject* tuple_dedup_map = PyDict_New();
8080
8289
  if (unlikely(!tuple_dedup_map)) return -1;
8081
8290
  {
8082
- const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 19, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 124, 2};
8291
+ const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 19, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 150, 2};
8083
8292
  PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_p0, __pyx_mstate->__pyx_n_u_p1, __pyx_mstate->__pyx_n_u_p2, __pyx_mstate->__pyx_n_u_p3, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_a1, __pyx_mstate->__pyx_n_u_b1, __pyx_mstate->__pyx_n_u_c1, __pyx_mstate->__pyx_n_u_d1, __pyx_mstate->__pyx_n_u_dt, __pyx_mstate->__pyx_n_u_delta_2, __pyx_mstate->__pyx_n_u_delta_3, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_c, __pyx_mstate->__pyx_n_u_d, __pyx_mstate->__pyx_n_u_t1, __pyx_mstate->__pyx_n_u_t1_2};
8084
8293
  __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_cu2qu_cu2qu_py, __pyx_mstate->__pyx_n_u_split_cubic_into_n_gen, __pyx_k__3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad;
8085
8294
  }
8086
8295
  {
8087
- const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 436, 97};
8296
+ const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 468, 97};
8088
8297
  PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_curve, __pyx_mstate->__pyx_n_u_max_err, __pyx_mstate->__pyx_n_u_all_quadratic, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_spline, __pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_s};
8089
8298
  __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_cu2qu_cu2qu_py, __pyx_mstate->__pyx_n_u_curve_to_quadratic, __pyx_k_AWBc_U_U_3fBa_AWCy_7_2QgQgT_a_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad;
8090
8299
  }
8091
8300
  {
8092
- const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 471, 211};
8301
+ const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 503, 211};
8093
8302
  PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_curves, __pyx_mstate->__pyx_n_u_max_errors, __pyx_mstate->__pyx_n_u_all_quadratic, __pyx_mstate->__pyx_n_u_l, __pyx_mstate->__pyx_n_u_last_i, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_splines, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_spline, __pyx_mstate->__pyx_n_u_curve, __pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_spline, __pyx_mstate->__pyx_n_u_s};
8094
8303
  __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_cu2qu_cu2qu_py, __pyx_mstate->__pyx_n_u_curves_to_quadratic, __pyx_k_J_Qawb_4uG4y_3a_3c_1A_avRq_T_AV, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad;
8095
8304
  }
@@ -8311,7 +8520,250 @@ static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
8311
8520
  PyErr_Format(PyExc_NameError,
8312
8521
  "name '%U' is not defined", name);
8313
8522
  }
8314
- return result;
8523
+ return result;
8524
+ }
8525
+
8526
+ /* PyFunctionFastCall */
8527
+ #if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL
8528
+ static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject *const *args, Py_ssize_t na,
8529
+ PyObject *globals) {
8530
+ PyFrameObject *f;
8531
+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
8532
+ PyObject **fastlocals;
8533
+ Py_ssize_t i;
8534
+ PyObject *result;
8535
+ assert(globals != NULL);
8536
+ /* XXX Perhaps we should create a specialized
8537
+ PyFrame_New() that doesn't take locals, but does
8538
+ take builtins without sanity checking them.
8539
+ */
8540
+ assert(tstate != NULL);
8541
+ f = PyFrame_New(tstate, co, globals, NULL);
8542
+ if (f == NULL) {
8543
+ return NULL;
8544
+ }
8545
+ fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
8546
+ for (i = 0; i < na; i++) {
8547
+ Py_INCREF(*args);
8548
+ fastlocals[i] = *args++;
8549
+ }
8550
+ result = PyEval_EvalFrameEx(f,0);
8551
+ ++tstate->recursion_depth;
8552
+ Py_DECREF(f);
8553
+ --tstate->recursion_depth;
8554
+ return result;
8555
+ }
8556
+ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs) {
8557
+ PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
8558
+ PyObject *globals = PyFunction_GET_GLOBALS(func);
8559
+ PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
8560
+ PyObject *closure;
8561
+ PyObject *kwdefs;
8562
+ PyObject *kwtuple, **k;
8563
+ PyObject **d;
8564
+ Py_ssize_t nd;
8565
+ Py_ssize_t nk;
8566
+ PyObject *result;
8567
+ assert(kwargs == NULL || PyDict_Check(kwargs));
8568
+ nk = kwargs ? PyDict_Size(kwargs) : 0;
8569
+ if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) {
8570
+ return NULL;
8571
+ }
8572
+ if (
8573
+ co->co_kwonlyargcount == 0 &&
8574
+ likely(kwargs == NULL || nk == 0) &&
8575
+ co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
8576
+ if (argdefs == NULL && co->co_argcount == nargs) {
8577
+ result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
8578
+ goto done;
8579
+ }
8580
+ else if (nargs == 0 && argdefs != NULL
8581
+ && co->co_argcount == Py_SIZE(argdefs)) {
8582
+ /* function called with no arguments, but all parameters have
8583
+ a default value: use default values as arguments .*/
8584
+ args = &PyTuple_GET_ITEM(argdefs, 0);
8585
+ result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
8586
+ goto done;
8587
+ }
8588
+ }
8589
+ if (kwargs != NULL) {
8590
+ Py_ssize_t pos, i;
8591
+ kwtuple = PyTuple_New(2 * nk);
8592
+ if (kwtuple == NULL) {
8593
+ result = NULL;
8594
+ goto done;
8595
+ }
8596
+ k = &PyTuple_GET_ITEM(kwtuple, 0);
8597
+ pos = i = 0;
8598
+ while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
8599
+ Py_INCREF(k[i]);
8600
+ Py_INCREF(k[i+1]);
8601
+ i += 2;
8602
+ }
8603
+ nk = i / 2;
8604
+ }
8605
+ else {
8606
+ kwtuple = NULL;
8607
+ k = NULL;
8608
+ }
8609
+ closure = PyFunction_GET_CLOSURE(func);
8610
+ kwdefs = PyFunction_GET_KW_DEFAULTS(func);
8611
+ if (argdefs != NULL) {
8612
+ d = &PyTuple_GET_ITEM(argdefs, 0);
8613
+ nd = Py_SIZE(argdefs);
8614
+ }
8615
+ else {
8616
+ d = NULL;
8617
+ nd = 0;
8618
+ }
8619
+ result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
8620
+ args, (int)nargs,
8621
+ k, (int)nk,
8622
+ d, (int)nd, kwdefs, closure);
8623
+ Py_XDECREF(kwtuple);
8624
+ done:
8625
+ Py_LeaveRecursiveCall();
8626
+ return result;
8627
+ }
8628
+ #endif
8629
+
8630
+ /* PyObjectCall */
8631
+ #if CYTHON_COMPILING_IN_CPYTHON
8632
+ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
8633
+ PyObject *result;
8634
+ ternaryfunc call = Py_TYPE(func)->tp_call;
8635
+ if (unlikely(!call))
8636
+ return PyObject_Call(func, arg, kw);
8637
+ if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
8638
+ return NULL;
8639
+ result = (*call)(func, arg, kw);
8640
+ Py_LeaveRecursiveCall();
8641
+ if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
8642
+ PyErr_SetString(
8643
+ PyExc_SystemError,
8644
+ "NULL result without error in PyObject_Call");
8645
+ }
8646
+ return result;
8647
+ }
8648
+ #endif
8649
+
8650
+ /* PyObjectCallMethO */
8651
+ #if CYTHON_COMPILING_IN_CPYTHON
8652
+ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
8653
+ PyObject *self, *result;
8654
+ PyCFunction cfunc;
8655
+ cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
8656
+ self = __Pyx_CyOrPyCFunction_GET_SELF(func);
8657
+ if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
8658
+ return NULL;
8659
+ result = cfunc(self, arg);
8660
+ Py_LeaveRecursiveCall();
8661
+ if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
8662
+ PyErr_SetString(
8663
+ PyExc_SystemError,
8664
+ "NULL result without error in PyObject_Call");
8665
+ }
8666
+ return result;
8667
+ }
8668
+ #endif
8669
+
8670
+ /* PyObjectFastCall */
8671
+ #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
8672
+ static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) {
8673
+ PyObject *argstuple;
8674
+ PyObject *result = 0;
8675
+ size_t i;
8676
+ argstuple = PyTuple_New((Py_ssize_t)nargs);
8677
+ if (unlikely(!argstuple)) return NULL;
8678
+ for (i = 0; i < nargs; i++) {
8679
+ Py_INCREF(args[i]);
8680
+ if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad;
8681
+ }
8682
+ result = __Pyx_PyObject_Call(func, argstuple, kwargs);
8683
+ bad:
8684
+ Py_DECREF(argstuple);
8685
+ return result;
8686
+ }
8687
+ #endif
8688
+ #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API
8689
+ #if PY_VERSION_HEX < 0x03090000
8690
+ #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable)
8691
+ #elif CYTHON_COMPILING_IN_CPYTHON
8692
+ static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) {
8693
+ PyTypeObject *tp = Py_TYPE(callable);
8694
+ #if defined(__Pyx_CyFunction_USED)
8695
+ if (__Pyx_CyFunction_CheckExact(callable)) {
8696
+ return __Pyx_CyFunction_func_vectorcall(callable);
8697
+ }
8698
+ #endif
8699
+ if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) {
8700
+ return NULL;
8701
+ }
8702
+ assert(PyCallable_Check(callable));
8703
+ Py_ssize_t offset = tp->tp_vectorcall_offset;
8704
+ assert(offset > 0);
8705
+ vectorcallfunc ptr;
8706
+ memcpy(&ptr, (char *) callable + offset, sizeof(ptr));
8707
+ return ptr;
8708
+ }
8709
+ #else
8710
+ #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable)
8711
+ #endif
8712
+ #endif
8713
+ static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) {
8714
+ Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
8715
+ #if CYTHON_COMPILING_IN_CPYTHON
8716
+ if (nargs == 0 && kwargs == NULL) {
8717
+ if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
8718
+ return __Pyx_PyObject_CallMethO(func, NULL);
8719
+ }
8720
+ else if (nargs == 1 && kwargs == NULL) {
8721
+ if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
8722
+ return __Pyx_PyObject_CallMethO(func, args[0]);
8723
+ }
8724
+ #endif
8725
+ #if PY_VERSION_HEX < 0x030800B1
8726
+ #if CYTHON_FAST_PYCCALL
8727
+ if (PyCFunction_Check(func)) {
8728
+ if (kwargs) {
8729
+ return _PyCFunction_FastCallDict(func, args, nargs, kwargs);
8730
+ } else {
8731
+ return _PyCFunction_FastCallKeywords(func, args, nargs, NULL);
8732
+ }
8733
+ }
8734
+ if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) {
8735
+ return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL);
8736
+ }
8737
+ #endif
8738
+ #if CYTHON_FAST_PYCALL
8739
+ if (PyFunction_Check(func)) {
8740
+ return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs);
8741
+ }
8742
+ #endif
8743
+ #endif
8744
+ if (kwargs == NULL) {
8745
+ #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API
8746
+ vectorcallfunc f = __Pyx_PyVectorcall_Function(func);
8747
+ if (f) {
8748
+ return f(func, args, _nargs, NULL);
8749
+ }
8750
+ #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
8751
+ if (__Pyx_CyFunction_CheckExact(func)) {
8752
+ __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
8753
+ if (f) return f(func, args, _nargs, NULL);
8754
+ }
8755
+ #elif CYTHON_COMPILING_IN_LIMITED_API && CYTHON_VECTORCALL
8756
+ return PyObject_Vectorcall(func, args, _nargs, NULL);
8757
+ #endif
8758
+ }
8759
+ if (nargs == 0) {
8760
+ return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs);
8761
+ }
8762
+ #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
8763
+ return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
8764
+ #else
8765
+ return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
8766
+ #endif
8315
8767
  }
8316
8768
 
8317
8769
  /* PyLongCompare */
@@ -8568,249 +9020,6 @@ static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
8568
9020
  return __Pyx_GetBuiltinName(name);
8569
9021
  }
8570
9022
 
8571
- /* PyFunctionFastCall */
8572
- #if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL
8573
- static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject *const *args, Py_ssize_t na,
8574
- PyObject *globals) {
8575
- PyFrameObject *f;
8576
- PyThreadState *tstate = __Pyx_PyThreadState_Current;
8577
- PyObject **fastlocals;
8578
- Py_ssize_t i;
8579
- PyObject *result;
8580
- assert(globals != NULL);
8581
- /* XXX Perhaps we should create a specialized
8582
- PyFrame_New() that doesn't take locals, but does
8583
- take builtins without sanity checking them.
8584
- */
8585
- assert(tstate != NULL);
8586
- f = PyFrame_New(tstate, co, globals, NULL);
8587
- if (f == NULL) {
8588
- return NULL;
8589
- }
8590
- fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
8591
- for (i = 0; i < na; i++) {
8592
- Py_INCREF(*args);
8593
- fastlocals[i] = *args++;
8594
- }
8595
- result = PyEval_EvalFrameEx(f,0);
8596
- ++tstate->recursion_depth;
8597
- Py_DECREF(f);
8598
- --tstate->recursion_depth;
8599
- return result;
8600
- }
8601
- static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs) {
8602
- PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
8603
- PyObject *globals = PyFunction_GET_GLOBALS(func);
8604
- PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
8605
- PyObject *closure;
8606
- PyObject *kwdefs;
8607
- PyObject *kwtuple, **k;
8608
- PyObject **d;
8609
- Py_ssize_t nd;
8610
- Py_ssize_t nk;
8611
- PyObject *result;
8612
- assert(kwargs == NULL || PyDict_Check(kwargs));
8613
- nk = kwargs ? PyDict_Size(kwargs) : 0;
8614
- if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) {
8615
- return NULL;
8616
- }
8617
- if (
8618
- co->co_kwonlyargcount == 0 &&
8619
- likely(kwargs == NULL || nk == 0) &&
8620
- co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
8621
- if (argdefs == NULL && co->co_argcount == nargs) {
8622
- result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
8623
- goto done;
8624
- }
8625
- else if (nargs == 0 && argdefs != NULL
8626
- && co->co_argcount == Py_SIZE(argdefs)) {
8627
- /* function called with no arguments, but all parameters have
8628
- a default value: use default values as arguments .*/
8629
- args = &PyTuple_GET_ITEM(argdefs, 0);
8630
- result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
8631
- goto done;
8632
- }
8633
- }
8634
- if (kwargs != NULL) {
8635
- Py_ssize_t pos, i;
8636
- kwtuple = PyTuple_New(2 * nk);
8637
- if (kwtuple == NULL) {
8638
- result = NULL;
8639
- goto done;
8640
- }
8641
- k = &PyTuple_GET_ITEM(kwtuple, 0);
8642
- pos = i = 0;
8643
- while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
8644
- Py_INCREF(k[i]);
8645
- Py_INCREF(k[i+1]);
8646
- i += 2;
8647
- }
8648
- nk = i / 2;
8649
- }
8650
- else {
8651
- kwtuple = NULL;
8652
- k = NULL;
8653
- }
8654
- closure = PyFunction_GET_CLOSURE(func);
8655
- kwdefs = PyFunction_GET_KW_DEFAULTS(func);
8656
- if (argdefs != NULL) {
8657
- d = &PyTuple_GET_ITEM(argdefs, 0);
8658
- nd = Py_SIZE(argdefs);
8659
- }
8660
- else {
8661
- d = NULL;
8662
- nd = 0;
8663
- }
8664
- result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
8665
- args, (int)nargs,
8666
- k, (int)nk,
8667
- d, (int)nd, kwdefs, closure);
8668
- Py_XDECREF(kwtuple);
8669
- done:
8670
- Py_LeaveRecursiveCall();
8671
- return result;
8672
- }
8673
- #endif
8674
-
8675
- /* PyObjectCall */
8676
- #if CYTHON_COMPILING_IN_CPYTHON
8677
- static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
8678
- PyObject *result;
8679
- ternaryfunc call = Py_TYPE(func)->tp_call;
8680
- if (unlikely(!call))
8681
- return PyObject_Call(func, arg, kw);
8682
- if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
8683
- return NULL;
8684
- result = (*call)(func, arg, kw);
8685
- Py_LeaveRecursiveCall();
8686
- if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
8687
- PyErr_SetString(
8688
- PyExc_SystemError,
8689
- "NULL result without error in PyObject_Call");
8690
- }
8691
- return result;
8692
- }
8693
- #endif
8694
-
8695
- /* PyObjectCallMethO */
8696
- #if CYTHON_COMPILING_IN_CPYTHON
8697
- static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
8698
- PyObject *self, *result;
8699
- PyCFunction cfunc;
8700
- cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
8701
- self = __Pyx_CyOrPyCFunction_GET_SELF(func);
8702
- if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
8703
- return NULL;
8704
- result = cfunc(self, arg);
8705
- Py_LeaveRecursiveCall();
8706
- if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
8707
- PyErr_SetString(
8708
- PyExc_SystemError,
8709
- "NULL result without error in PyObject_Call");
8710
- }
8711
- return result;
8712
- }
8713
- #endif
8714
-
8715
- /* PyObjectFastCall */
8716
- #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
8717
- static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) {
8718
- PyObject *argstuple;
8719
- PyObject *result = 0;
8720
- size_t i;
8721
- argstuple = PyTuple_New((Py_ssize_t)nargs);
8722
- if (unlikely(!argstuple)) return NULL;
8723
- for (i = 0; i < nargs; i++) {
8724
- Py_INCREF(args[i]);
8725
- if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad;
8726
- }
8727
- result = __Pyx_PyObject_Call(func, argstuple, kwargs);
8728
- bad:
8729
- Py_DECREF(argstuple);
8730
- return result;
8731
- }
8732
- #endif
8733
- #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API
8734
- #if PY_VERSION_HEX < 0x03090000
8735
- #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable)
8736
- #elif CYTHON_COMPILING_IN_CPYTHON
8737
- static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) {
8738
- PyTypeObject *tp = Py_TYPE(callable);
8739
- #if defined(__Pyx_CyFunction_USED)
8740
- if (__Pyx_CyFunction_CheckExact(callable)) {
8741
- return __Pyx_CyFunction_func_vectorcall(callable);
8742
- }
8743
- #endif
8744
- if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) {
8745
- return NULL;
8746
- }
8747
- assert(PyCallable_Check(callable));
8748
- Py_ssize_t offset = tp->tp_vectorcall_offset;
8749
- assert(offset > 0);
8750
- vectorcallfunc ptr;
8751
- memcpy(&ptr, (char *) callable + offset, sizeof(ptr));
8752
- return ptr;
8753
- }
8754
- #else
8755
- #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable)
8756
- #endif
8757
- #endif
8758
- static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) {
8759
- Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
8760
- #if CYTHON_COMPILING_IN_CPYTHON
8761
- if (nargs == 0 && kwargs == NULL) {
8762
- if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
8763
- return __Pyx_PyObject_CallMethO(func, NULL);
8764
- }
8765
- else if (nargs == 1 && kwargs == NULL) {
8766
- if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
8767
- return __Pyx_PyObject_CallMethO(func, args[0]);
8768
- }
8769
- #endif
8770
- #if PY_VERSION_HEX < 0x030800B1
8771
- #if CYTHON_FAST_PYCCALL
8772
- if (PyCFunction_Check(func)) {
8773
- if (kwargs) {
8774
- return _PyCFunction_FastCallDict(func, args, nargs, kwargs);
8775
- } else {
8776
- return _PyCFunction_FastCallKeywords(func, args, nargs, NULL);
8777
- }
8778
- }
8779
- if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) {
8780
- return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL);
8781
- }
8782
- #endif
8783
- #if CYTHON_FAST_PYCALL
8784
- if (PyFunction_Check(func)) {
8785
- return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs);
8786
- }
8787
- #endif
8788
- #endif
8789
- if (kwargs == NULL) {
8790
- #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API
8791
- vectorcallfunc f = __Pyx_PyVectorcall_Function(func);
8792
- if (f) {
8793
- return f(func, args, _nargs, NULL);
8794
- }
8795
- #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
8796
- if (__Pyx_CyFunction_CheckExact(func)) {
8797
- __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
8798
- if (f) return f(func, args, _nargs, NULL);
8799
- }
8800
- #elif CYTHON_COMPILING_IN_LIMITED_API && CYTHON_VECTORCALL
8801
- return PyObject_Vectorcall(func, args, _nargs, NULL);
8802
- #endif
8803
- }
8804
- if (nargs == 0) {
8805
- return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs);
8806
- }
8807
- #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
8808
- return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
8809
- #else
8810
- return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
8811
- #endif
8812
- }
8813
-
8814
9023
  /* TupleAndListFromArray */
8815
9024
  #if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL
8816
9025
  static CYTHON_INLINE PyObject *
@@ -11131,6 +11340,7 @@ static int __pyx_CommonTypesMetaclass_init(PyObject *module) {
11131
11340
  return -1;
11132
11341
  }
11133
11342
  mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
11343
+ Py_DECREF(bases);
11134
11344
  if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
11135
11345
  return -1;
11136
11346
  }
@@ -14904,6 +15114,10 @@ static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt
14904
15114
  PyCode_NewWithPosOnlyArgs
14905
15115
  #endif
14906
15116
  (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes);
15117
+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1
15118
+ if (likely(result))
15119
+ result->_co_firsttraceable = 0;
15120
+ #endif
14907
15121
  return result;
14908
15122
  }
14909
15123
  #elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY