fonttools 4.58.0__cp312-cp312-win_amd64.whl → 4.58.1__cp312-cp312-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 (37) hide show
  1. fontTools/__init__.py +1 -1
  2. fontTools/cffLib/specializer.py +4 -1
  3. fontTools/cu2qu/cu2qu.c +36 -24
  4. fontTools/cu2qu/cu2qu.cp312-win_amd64.pyd +0 -0
  5. fontTools/feaLib/ast.py +1 -72
  6. fontTools/feaLib/builder.py +55 -45
  7. fontTools/feaLib/lexer.c +60 -43
  8. fontTools/feaLib/lexer.cp312-win_amd64.pyd +0 -0
  9. fontTools/merge/cmap.py +33 -1
  10. fontTools/merge/tables.py +12 -1
  11. fontTools/misc/bezierTools.c +137 -125
  12. fontTools/misc/bezierTools.cp312-win_amd64.pyd +0 -0
  13. fontTools/misc/loggingTools.py +1 -1
  14. fontTools/misc/symfont.py +6 -8
  15. fontTools/mtiLib/__init__.py +1 -1
  16. fontTools/otlLib/builder.py +164 -0
  17. fontTools/pens/momentsPen.c +42 -25
  18. fontTools/pens/momentsPen.cp312-win_amd64.pyd +0 -0
  19. fontTools/pens/t2CharStringPen.py +31 -11
  20. fontTools/qu2cu/qu2cu.c +47 -35
  21. fontTools/qu2cu/qu2cu.cp312-win_amd64.pyd +0 -0
  22. fontTools/subset/__init__.py +1 -1
  23. fontTools/ufoLib/__init__.py +1 -1
  24. fontTools/varLib/__init__.py +18 -6
  25. fontTools/varLib/featureVars.py +13 -7
  26. fontTools/varLib/hvar.py +1 -1
  27. fontTools/varLib/instancer/__init__.py +14 -5
  28. fontTools/varLib/iup.c +52 -40
  29. fontTools/varLib/iup.cp312-win_amd64.pyd +0 -0
  30. {fonttools-4.58.0.dist-info → fonttools-4.58.1.dist-info}/METADATA +20 -1
  31. {fonttools-4.58.0.dist-info → fonttools-4.58.1.dist-info}/RECORD +37 -37
  32. {fonttools-4.58.0.dist-info → fonttools-4.58.1.dist-info}/WHEEL +1 -1
  33. {fonttools-4.58.0.data → fonttools-4.58.1.data}/data/share/man/man1/ttx.1 +0 -0
  34. {fonttools-4.58.0.dist-info → fonttools-4.58.1.dist-info}/entry_points.txt +0 -0
  35. {fonttools-4.58.0.dist-info → fonttools-4.58.1.dist-info}/licenses/LICENSE +0 -0
  36. {fonttools-4.58.0.dist-info → fonttools-4.58.1.dist-info}/licenses/LICENSE.external +0 -0
  37. {fonttools-4.58.0.dist-info → fonttools-4.58.1.dist-info}/top_level.txt +0 -0
fontTools/qu2cu/qu2cu.c CHANGED
@@ -1,4 +1,4 @@
1
- /* Generated by Cython 3.1.0 */
1
+ /* Generated by Cython 3.1.1 */
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_0"
36
- #define CYTHON_HEX_VERSION 0x030100F0
35
+ #define __PYX_ABI_VERSION "3_1_1"
36
+ #define CYTHON_HEX_VERSION 0x030101F0
37
37
  #define CYTHON_FUTURE_DIVISION 1
38
38
  /* CModulePreamble */
39
39
  #include <stddef.h>
@@ -4323,7 +4323,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
4323
4323
  * ) -> List[Tuple[Point, ...]]:
4324
4324
  * """Converts a connecting list of quadratic splines to a list of quadratic
4325
4325
  */
4326
- if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject *)Py_False)));
4326
+ if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
4327
4327
  for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
4328
4328
  if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("quadratic_to_curves", 0, 1, 3, i); __PYX_ERR(0, 178, __pyx_L3_error) }
4329
4329
  }
@@ -4343,7 +4343,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
4343
4343
  break;
4344
4344
  default: goto __pyx_L5_argtuple_error;
4345
4345
  }
4346
- if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject *)Py_False)));
4346
+ if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
4347
4347
  }
4348
4348
  __pyx_v_quads = ((PyObject*)values[0]);
4349
4349
  if (values[1]) {
@@ -8595,7 +8595,7 @@ __Pyx_RefNannySetupContext("PyInit_qu2cu", 0);
8595
8595
  * cost=cython.int,
8596
8596
  * is_complex=cython.int,
8597
8597
  */
8598
- __pyx_t_6 = PyTuple_Pack(2, __pyx_t_7, ((PyObject *)Py_False)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 178, __pyx_L1_error)
8598
+ __pyx_t_6 = PyTuple_Pack(2, __pyx_t_7, ((PyObject*)Py_False)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 178, __pyx_L1_error)
8599
8599
  __Pyx_GOTREF(__pyx_t_6);
8600
8600
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8601
8601
  __pyx_t_7 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 178, __pyx_L1_error)
@@ -9007,8 +9007,8 @@ static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) {
9007
9007
  } __Pyx_PyCode_New_function_description;
9008
9008
  /* NewCodeObj.proto */
9009
9009
  static PyObject* __Pyx_PyCode_New(
9010
- __Pyx_PyCode_New_function_description descr,
9011
- PyObject **varnames,
9010
+ const __Pyx_PyCode_New_function_description descr,
9011
+ PyObject * const *varnames,
9012
9012
  PyObject *filename,
9013
9013
  PyObject *funcname,
9014
9014
  const char *line_table,
@@ -9020,38 +9020,38 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) {
9020
9020
  PyObject* tuple_dedup_map = PyDict_New();
9021
9021
  if (unlikely(!tuple_dedup_map)) return -1;
9022
9022
  {
9023
- __Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 235, 2};
9024
- PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_cost, __pyx_mstate->__pyx_n_u_is_complex, __pyx_mstate->__pyx_n_u_c};
9023
+ const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 235, 2};
9024
+ PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cost, __pyx_mstate->__pyx_n_u_is_complex, __pyx_mstate->__pyx_n_u_c};
9025
9025
  __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_qu2cu_qu2cu_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k__3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad;
9026
9026
  }
9027
9027
  {
9028
- __Pyx_PyCode_New_function_description descr = {0, 0, 0, 21, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 340, 2};
9029
- PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_k, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_n_u_i_sol_count, __pyx_mstate->__pyx_n_u_j_sol_count, __pyx_mstate->__pyx_n_u_this_sol_count, __pyx_mstate->__pyx_n_u_tolerance, __pyx_mstate->__pyx_n_u_err, __pyx_mstate->__pyx_n_u_error, __pyx_mstate->__pyx_n_u_i_sol_error, __pyx_mstate->__pyx_n_u_j_sol_error, __pyx_mstate->__pyx_n_u_all_cubic, __pyx_mstate->__pyx_n_u_is_cubic, __pyx_mstate->__pyx_n_u_count, __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_v, __pyx_mstate->__pyx_n_u_u};
9028
+ const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 21, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 340, 2};
9029
+ PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_k, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_n_u_i_sol_count, __pyx_mstate->__pyx_n_u_j_sol_count, __pyx_mstate->__pyx_n_u_this_sol_count, __pyx_mstate->__pyx_n_u_tolerance, __pyx_mstate->__pyx_n_u_err, __pyx_mstate->__pyx_n_u_error, __pyx_mstate->__pyx_n_u_i_sol_error, __pyx_mstate->__pyx_n_u_j_sol_error, __pyx_mstate->__pyx_n_u_all_cubic, __pyx_mstate->__pyx_n_u_is_cubic, __pyx_mstate->__pyx_n_u_count, __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_v, __pyx_mstate->__pyx_n_u_u};
9030
9030
  __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_qu2cu_qu2cu_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k__4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad;
9031
9031
  }
9032
9032
  {
9033
- __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 82, 56};
9034
- PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_p0, __pyx_mstate->__pyx_n_u_p1, __pyx_mstate->__pyx_n_u_p2, __pyx_mstate->__pyx_n_u_p1_2_3};
9033
+ const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 82, 56};
9034
+ 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_p1_2_3};
9035
9035
  __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_qu2cu_qu2cu_py, __pyx_mstate->__pyx_n_u_elevate_quadratic, __pyx_k_S_2Rq_Cr_3b_Cr_3b, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad;
9036
9036
  }
9037
9037
  {
9038
- __Pyx_PyCode_New_function_description descr = {1, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 154, 112};
9039
- PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_count, __pyx_mstate->__pyx_n_u_num_offcurves, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_off1, __pyx_mstate->__pyx_n_u_off2, __pyx_mstate->__pyx_n_u_on, __pyx_mstate->__pyx_n_u_q};
9038
+ const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 154, 112};
9039
+ PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_count, __pyx_mstate->__pyx_n_u_num_offcurves, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_off1, __pyx_mstate->__pyx_n_u_off2, __pyx_mstate->__pyx_n_u_on, __pyx_mstate->__pyx_n_u_q};
9040
9040
  __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_qu2cu_qu2cu_py, __pyx_mstate->__pyx_n_u_add_implicit_on_curves, __pyx_k_AQ_A_Cq_2Q_U_3a_q_q_2Q_U_U_F_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad;
9041
9041
  }
9042
9042
  {
9043
- __Pyx_PyCode_New_function_description descr = {3, 0, 0, 17, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 178, 262};
9044
- PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_quads, __pyx_mstate->__pyx_n_u_max_err, __pyx_mstate->__pyx_n_u_all_cubic, __pyx_mstate->__pyx_n_u_cost, __pyx_mstate->__pyx_n_u_is_complex, __pyx_mstate->__pyx_n_u_q, __pyx_mstate->__pyx_n_u_costs, __pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_qq, __pyx_mstate->__pyx_n_u_curves, __pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_y, __pyx_mstate->__pyx_n_u_curve, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr};
9043
+ const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 17, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 178, 262};
9044
+ PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_quads, __pyx_mstate->__pyx_n_u_max_err, __pyx_mstate->__pyx_n_u_all_cubic, __pyx_mstate->__pyx_n_u_cost, __pyx_mstate->__pyx_n_u_is_complex, __pyx_mstate->__pyx_n_u_q, __pyx_mstate->__pyx_n_u_costs, __pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_qq, __pyx_mstate->__pyx_n_u_curves, __pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_y, __pyx_mstate->__pyx_n_u_curve, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr};
9045
9045
  __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_qu2cu_qu2cu_py, __pyx_mstate->__pyx_n_u_quadratic_to_curves, __pyx_k_Q_q_6_Qe1Bat3a_t1_S_S_c_U_ar_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad;
9046
9046
  }
9047
9047
  {
9048
- __Pyx_PyCode_New_function_description descr = {4, 0, 0, 42, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 242, 914};
9049
- PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_q, __pyx_mstate->__pyx_n_u_costs, __pyx_mstate->__pyx_n_u_tolerance, __pyx_mstate->__pyx_n_u_all_cubic, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_k, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_n_u_i_sol_count, __pyx_mstate->__pyx_n_u_j_sol_count, __pyx_mstate->__pyx_n_u_this_sol_count, __pyx_mstate->__pyx_n_u_err, __pyx_mstate->__pyx_n_u_error, __pyx_mstate->__pyx_n_u_i_sol_error, __pyx_mstate->__pyx_n_u_j_sol_error, __pyx_mstate->__pyx_n_u_is_cubic, __pyx_mstate->__pyx_n_u_count, __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_v, __pyx_mstate->__pyx_n_u_u, __pyx_mstate->__pyx_n_u_elevated_quadratics, __pyx_mstate->__pyx_n_u_forced, __pyx_mstate->__pyx_n_u_sols, __pyx_mstate->__pyx_n_u_impossible, __pyx_mstate->__pyx_n_u_best_sol, __pyx_mstate->__pyx_n_u_this_count, __pyx_mstate->__pyx_n_u_i_sol, __pyx_mstate->__pyx_n_u_curve, __pyx_mstate->__pyx_n_u_ts, __pyx_mstate->__pyx_n_u_reconstructed_iter, __pyx_mstate->__pyx_n_u_reconstructed, __pyx_mstate->__pyx_n_u_reconst, __pyx_mstate->__pyx_n_u_orig, __pyx_mstate->__pyx_n_u_splits, __pyx_mstate->__pyx_n_u_cubic, __pyx_mstate->__pyx_n_u_curves, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr};
9048
+ const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 42, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 242, 914};
9049
+ PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_q, __pyx_mstate->__pyx_n_u_costs, __pyx_mstate->__pyx_n_u_tolerance, __pyx_mstate->__pyx_n_u_all_cubic, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_k, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_n_u_i_sol_count, __pyx_mstate->__pyx_n_u_j_sol_count, __pyx_mstate->__pyx_n_u_this_sol_count, __pyx_mstate->__pyx_n_u_err, __pyx_mstate->__pyx_n_u_error, __pyx_mstate->__pyx_n_u_i_sol_error, __pyx_mstate->__pyx_n_u_j_sol_error, __pyx_mstate->__pyx_n_u_is_cubic, __pyx_mstate->__pyx_n_u_count, __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_v, __pyx_mstate->__pyx_n_u_u, __pyx_mstate->__pyx_n_u_elevated_quadratics, __pyx_mstate->__pyx_n_u_forced, __pyx_mstate->__pyx_n_u_sols, __pyx_mstate->__pyx_n_u_impossible, __pyx_mstate->__pyx_n_u_best_sol, __pyx_mstate->__pyx_n_u_this_count, __pyx_mstate->__pyx_n_u_i_sol, __pyx_mstate->__pyx_n_u_curve, __pyx_mstate->__pyx_n_u_ts, __pyx_mstate->__pyx_n_u_reconstructed_iter, __pyx_mstate->__pyx_n_u_reconstructed, __pyx_mstate->__pyx_n_u_reconst, __pyx_mstate->__pyx_n_u_orig, __pyx_mstate->__pyx_n_u_splits, __pyx_mstate->__pyx_n_u_cubic, __pyx_mstate->__pyx_n_u_curves, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr};
9050
9050
  __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_qu2cu_qu2cu_py, __pyx_mstate->__pyx_n_u_spline_to_curves, __pyx_k_a_3as_S_1AT_2T_U_q_3as_Cq_U_3c, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad;
9051
9051
  }
9052
9052
  {
9053
- __Pyx_PyCode_New_function_description descr = {0, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 386, 131};
9054
- PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_generate_curve, __pyx_mstate->__pyx_n_u_curve_to_quadratic, __pyx_mstate->__pyx_n_u_tolerance, __pyx_mstate->__pyx_n_u_reconstruct_tolerance, __pyx_mstate->__pyx_n_u_curve, __pyx_mstate->__pyx_n_u_quadratics, __pyx_mstate->__pyx_n_u_curves};
9053
+ const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 386, 131};
9054
+ PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_generate_curve, __pyx_mstate->__pyx_n_u_curve_to_quadratic, __pyx_mstate->__pyx_n_u_tolerance, __pyx_mstate->__pyx_n_u_reconstruct_tolerance, __pyx_mstate->__pyx_n_u_curve, __pyx_mstate->__pyx_n_u_quadratics, __pyx_mstate->__pyx_n_u_curves};
9055
9055
  __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_qu2cu_qu2cu_py, __pyx_mstate->__pyx_n_u_main_2, __pyx_k_Jb_N_1G1_2_8_Qa_q_Cq_Q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad;
9056
9056
  }
9057
9057
  Py_DECREF(tuple_dedup_map);
@@ -9776,6 +9776,11 @@ static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *
9776
9776
  Py_DECREF(selfless_args);
9777
9777
  return result;
9778
9778
  }
9779
+ #elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000
9780
+ static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) {
9781
+ return _PyObject_Vectorcall
9782
+ (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames);
9783
+ }
9779
9784
  #else
9780
9785
  static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) {
9781
9786
  return
@@ -10099,7 +10104,9 @@ static int __Pyx_ParseKeywordDict(
10099
10104
  PyObject** const *name;
10100
10105
  PyObject** const *first_kw_arg = argnames + num_pos_args;
10101
10106
  Py_ssize_t extracted = 0;
10107
+ #if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
10102
10108
  if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
10109
+ #endif
10103
10110
  name = first_kw_arg;
10104
10111
  while (*name && num_kwargs > extracted) {
10105
10112
  PyObject * key = **name;
@@ -10147,7 +10154,9 @@ static int __Pyx_ParseKeywordDictToDict(
10147
10154
  PyObject** const *name;
10148
10155
  PyObject** const *first_kw_arg = argnames + num_pos_args;
10149
10156
  Py_ssize_t len;
10157
+ #if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
10150
10158
  if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
10159
+ #endif
10151
10160
  if (PyDict_Update(kwds2, kwds) < 0) goto bad;
10152
10161
  name = first_kw_arg;
10153
10162
  while (*name) {
@@ -11519,7 +11528,8 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
11519
11528
  if (unlikely(!empty_dict))
11520
11529
  goto bad;
11521
11530
  if (level == -1) {
11522
- if (strchr(__Pyx_MODULE_NAME, '.') != (0)) {
11531
+ const char* package_sep = strchr(__Pyx_MODULE_NAME, '.');
11532
+ if (package_sep != (0)) {
11523
11533
  module = PyImport_ImportModuleLevelObject(
11524
11534
  name, __pyx_mstate_global->__pyx_d, empty_dict, from_list, 1);
11525
11535
  if (unlikely(!module)) {
@@ -14070,7 +14080,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) {
14070
14080
  return PyLong_FromLong((long) value);
14071
14081
  } else if (sizeof(int) <= sizeof(unsigned long)) {
14072
14082
  return PyLong_FromUnsignedLong((unsigned long) value);
14073
- #ifdef HAVE_LONG_LONG
14083
+ #if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY
14074
14084
  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
14075
14085
  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
14076
14086
  #endif
@@ -14141,7 +14151,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) {
14141
14151
  return PyLong_FromLong((long) value);
14142
14152
  } else if (sizeof(long) <= sizeof(unsigned long)) {
14143
14153
  return PyLong_FromUnsignedLong((unsigned long) value);
14144
- #ifdef HAVE_LONG_LONG
14154
+ #if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY
14145
14155
  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
14146
14156
  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
14147
14157
  #endif
@@ -14704,8 +14714,8 @@ static void __Pyx__ReturnWithStopIteration(PyObject* value, int async) {
14704
14714
  PyObject *exc;
14705
14715
  PyObject *exc_type = async ? PyExc_StopAsyncIteration : PyExc_StopIteration;
14706
14716
  #if CYTHON_COMPILING_IN_CPYTHON
14707
- if ((PY_VERSION_HEX >= 0x030C00A6) || unlikely(PyTuple_Check(value) || PyExceptionInstance_Check(value))) {
14708
- if ((PY_VERSION_HEX >= 0x030e00A1)) {
14717
+ if ((PY_VERSION_HEX >= (0x030C00A6)) || unlikely(PyTuple_Check(value) || PyExceptionInstance_Check(value))) {
14718
+ if (PY_VERSION_HEX >= (0x030e00A1)) {
14709
14719
  exc = __Pyx_PyObject_CallOneArg(exc_type, value);
14710
14720
  } else {
14711
14721
  PyObject *args_tuple = PyTuple_New(1);
@@ -15070,17 +15080,19 @@ __Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen, PyObject** retval)
15070
15080
  static __Pyx_PySendResult
15071
15081
  __Pyx_Coroutine_SendToDelegate(__pyx_CoroutineObject *gen, __Pyx_pyiter_sendfunc gen_am_send, PyObject *value, PyObject **retval) {
15072
15082
  PyObject *ret = NULL;
15073
- __Pyx_PySendResult result;
15083
+ __Pyx_PySendResult delegate_result, result;
15074
15084
  assert(__Pyx_Coroutine_get_is_running(gen));
15075
- result = gen_am_send(gen->yieldfrom, value, &ret);
15076
- if (result == PYGEN_NEXT) {
15085
+ delegate_result = gen_am_send(gen->yieldfrom, value, &ret);
15086
+ if (delegate_result == PYGEN_NEXT) {
15077
15087
  assert (ret != NULL);
15078
15088
  *retval = ret;
15079
15089
  return PYGEN_NEXT;
15080
15090
  }
15081
- assert (result != PYGEN_ERROR || ret == NULL);
15091
+ assert (delegate_result != PYGEN_ERROR || ret == NULL);
15082
15092
  __Pyx_Coroutine_Undelegate(gen);
15083
- return __Pyx_Coroutine_SendEx(gen, ret, retval, 0);
15093
+ result = __Pyx_Coroutine_SendEx(gen, ret, retval, 0);
15094
+ Py_XDECREF(ret);
15095
+ return result;
15084
15096
  }
15085
15097
  #endif
15086
15098
  static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
@@ -15893,9 +15905,9 @@ static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt
15893
15905
  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
15894
15906
  #endif
15895
15907
  static PyObject* __Pyx_PyCode_New(
15896
- __Pyx_PyCode_New_function_description descr,
15897
- PyObject **varnames,
15898
- PyObject* filename,
15908
+ const __Pyx_PyCode_New_function_description descr,
15909
+ PyObject * const *varnames,
15910
+ PyObject *filename,
15899
15911
  PyObject *funcname,
15900
15912
  const char *line_table,
15901
15913
  PyObject *tuple_dedup_map
Binary file
@@ -3757,7 +3757,7 @@ def main(args=None):
3757
3757
  text += g[7:]
3758
3758
  continue
3759
3759
  if g.startswith("--text-file="):
3760
- with open(g[12:], encoding="utf-8") as f:
3760
+ with open(g[12:], encoding="utf-8-sig") as f:
3761
3761
  text += f.read().replace("\n", "")
3762
3762
  continue
3763
3763
  if g.startswith("--unicodes="):
@@ -654,7 +654,7 @@ class UFOReader(_UFOBaseIO):
654
654
  The returned string is empty if the file is missing.
655
655
  """
656
656
  try:
657
- with self.fs.open(FEATURES_FILENAME, "r", encoding="utf-8") as f:
657
+ with self.fs.open(FEATURES_FILENAME, "r", encoding="utf-8-sig") as f:
658
658
  return f.read()
659
659
  except fs.errors.ResourceNotFound:
660
660
  return ""
@@ -109,6 +109,8 @@ def _add_fvar(font, axes, instances: List[InstanceDescriptor]):
109
109
  axis.flags = int(a.hidden)
110
110
  fvar.axes.append(axis)
111
111
 
112
+ default_coordinates = {axis.axisTag: axis.defaultValue for axis in fvar.axes}
113
+
112
114
  for instance in instances:
113
115
  # Filter out discrete axis locations
114
116
  coordinates = {
@@ -130,16 +132,26 @@ def _add_fvar(font, axes, instances: List[InstanceDescriptor]):
130
132
  psname = instance.postScriptFontName
131
133
 
132
134
  inst = NamedInstance()
133
- inst.subfamilyNameID = nameTable.addMultilingualName(
134
- localisedStyleName, mac=macNames
135
+ inst.coordinates = {
136
+ axes[k].tag: axes[k].map_backward(v) for k, v in coordinates.items()
137
+ }
138
+
139
+ subfamilyNameID = nameTable.findMultilingualName(
140
+ localisedStyleName, windows=True, mac=macNames
135
141
  )
142
+ if subfamilyNameID in {2, 17} and inst.coordinates == default_coordinates:
143
+ # Instances can only reuse an existing name ID 2 or 17 if they are at the
144
+ # default location across all axes, see:
145
+ # https://github.com/fonttools/fonttools/issues/3825.
146
+ inst.subfamilyNameID = subfamilyNameID
147
+ else:
148
+ inst.subfamilyNameID = nameTable.addMultilingualName(
149
+ localisedStyleName, windows=True, mac=macNames, minNameID=256
150
+ )
151
+
136
152
  if psname is not None:
137
153
  psname = tostr(psname)
138
154
  inst.postscriptNameID = nameTable.addName(psname, platforms=platforms)
139
- inst.coordinates = {
140
- axes[k].tag: axes[k].map_backward(v) for k, v in coordinates.items()
141
- }
142
- # inst.coordinates = {axes[k].tag:v for k,v in coordinates.items()}
143
155
  fvar.instances.append(inst)
144
156
 
145
157
  assert "fvar" not in font
@@ -392,10 +392,13 @@ def addFeatureVariationsRaw(font, table, conditionalSubstitutions, featureTag="r
392
392
 
393
393
  for scriptRecord in table.ScriptList.ScriptRecord:
394
394
  if scriptRecord.Script.DefaultLangSys is None:
395
- raise VarLibError(
396
- "Feature variations require that the script "
397
- f"'{scriptRecord.ScriptTag}' defines a default language system."
398
- )
395
+ # We need to have a default LangSys to attach variations to.
396
+ langSys = ot.LangSys()
397
+ langSys.LookupOrder = None
398
+ langSys.ReqFeatureIndex = 0xFFFF
399
+ langSys.FeatureIndex = []
400
+ langSys.FeatureCount = 0
401
+ scriptRecord.Script.DefaultLangSys = langSys
399
402
  langSystems = [lsr.LangSys for lsr in scriptRecord.Script.LangSysRecord]
400
403
  for langSys in [scriptRecord.Script.DefaultLangSys] + langSystems:
401
404
  langSys.FeatureIndex.append(varFeatureIndex)
@@ -597,9 +600,12 @@ def buildFeatureRecord(featureTag, lookupListIndices):
597
600
  def buildFeatureVariationRecord(conditionTable, substitutionRecords):
598
601
  """Build a FeatureVariationRecord."""
599
602
  fvr = ot.FeatureVariationRecord()
600
- fvr.ConditionSet = ot.ConditionSet()
601
- fvr.ConditionSet.ConditionTable = conditionTable
602
- fvr.ConditionSet.ConditionCount = len(conditionTable)
603
+ if len(conditionTable) != 0:
604
+ fvr.ConditionSet = ot.ConditionSet()
605
+ fvr.ConditionSet.ConditionTable = conditionTable
606
+ fvr.ConditionSet.ConditionCount = len(conditionTable)
607
+ else:
608
+ fvr.ConditionSet = None
603
609
  fvr.FeatureTableSubstitution = ot.FeatureTableSubstitution()
604
610
  fvr.FeatureTableSubstitution.Version = 0x00010000
605
611
  fvr.FeatureTableSubstitution.SubstitutionRecord = substitutionRecords
fontTools/varLib/hvar.py CHANGED
@@ -18,7 +18,7 @@ def _get_advance_metrics(font, axisTags, tableFields):
18
18
  # advance width at that peak. Then pass these all to a VariationModel
19
19
  # builder to compute back the deltas.
20
20
  # 2. For each master peak, pull out the deltas of the advance width directly,
21
- # and feed these to the VarStoreBuilder, forgoing the remoding step.
21
+ # and feed these to the VarStoreBuilder, forgoing the remodeling step.
22
22
  # We'll go with the second option, as it's simpler, faster, and more direct.
23
23
  gvar = font["gvar"]
24
24
  vhAdvanceDeltasAndSupports = {}
@@ -675,6 +675,7 @@ def instantiateCFF2(
675
675
  privateDicts.append(fd.Private)
676
676
 
677
677
  allCommands = []
678
+ allCommandPrivates = []
678
679
  for cs in charStrings:
679
680
  assert cs.private.vstore.otVarStore is varStore # Or in many places!!
680
681
  commands = programToCommands(cs.program, getNumRegions=getNumRegions)
@@ -683,6 +684,7 @@ def instantiateCFF2(
683
684
  if specialize:
684
685
  commands = specializeCommands(commands, generalizeFirst=not generalize)
685
686
  allCommands.append(commands)
687
+ allCommandPrivates.append(cs.private)
686
688
 
687
689
  def storeBlendsToVarStore(arg):
688
690
  if not isinstance(arg, list):
@@ -742,8 +744,8 @@ def instantiateCFF2(
742
744
  assert varData.ItemCount == 0
743
745
 
744
746
  # Add charstring blend lists to VarStore so we can instantiate them
745
- for commands in allCommands:
746
- vsindex = 0
747
+ for commands, private in zip(allCommands, allCommandPrivates):
748
+ vsindex = getattr(private, "vsindex", 0)
747
749
  for command in commands:
748
750
  if command[0] == "vsindex":
749
751
  vsindex = command[1][0]
@@ -752,7 +754,6 @@ def instantiateCFF2(
752
754
  storeBlendsToVarStore(arg)
753
755
 
754
756
  # Add private blend lists to VarStore so we can instantiate values
755
- vsindex = 0
756
757
  for opcode, name, arg_type, default, converter in privateDictOperators2:
757
758
  if arg_type not in ("number", "delta", "array"):
758
759
  continue
@@ -763,6 +764,7 @@ def instantiateCFF2(
763
764
  continue
764
765
  values = getattr(private, name)
765
766
 
767
+ # This is safe here since "vsindex" is the first in the privateDictOperators2
766
768
  if name == "vsindex":
767
769
  vsindex = values[0]
768
770
  continue
@@ -783,8 +785,8 @@ def instantiateCFF2(
783
785
 
784
786
  # Read back new charstring blends from the instantiated VarStore
785
787
  varDataCursor = [0] * len(varStore.VarData)
786
- for commands in allCommands:
787
- vsindex = 0
788
+ for commands, private in zip(allCommands, allCommandPrivates):
789
+ vsindex = getattr(private, "vsindex", 0)
788
790
  for command in commands:
789
791
  if command[0] == "vsindex":
790
792
  vsindex = command[1][0]
@@ -799,9 +801,16 @@ def instantiateCFF2(
799
801
  if arg_type not in ("number", "delta", "array"):
800
802
  continue
801
803
 
804
+ vsindex = 0
802
805
  for private in privateDicts:
803
806
  if not hasattr(private, name):
804
807
  continue
808
+
809
+ # This is safe here since "vsindex" is the first in the privateDictOperators2
810
+ if name == "vsindex":
811
+ vsindex = values[0]
812
+ continue
813
+
805
814
  values = getattr(private, name)
806
815
  if arg_type == "number":
807
816
  values = [values]
fontTools/varLib/iup.c CHANGED
@@ -1,4 +1,4 @@
1
- /* Generated by Cython 3.1.0 */
1
+ /* Generated by Cython 3.1.1 */
2
2
 
3
3
  /* BEGIN: Cython Metadata
4
4
  {
@@ -26,8 +26,8 @@ END: Cython Metadata */
26
26
  #elif PY_VERSION_HEX < 0x03080000
27
27
  #error Cython requires Python 3.8+.
28
28
  #else
29
- #define __PYX_ABI_VERSION "3_1_0"
30
- #define CYTHON_HEX_VERSION 0x030100F0
29
+ #define __PYX_ABI_VERSION "3_1_1"
30
+ #define CYTHON_HEX_VERSION 0x030101F0
31
31
  #define CYTHON_FUTURE_DIVISION 1
32
32
  /* CModulePreamble */
33
33
  #include <stddef.h>
@@ -12072,8 +12072,8 @@ static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) {
12072
12072
  } __Pyx_PyCode_New_function_description;
12073
12073
  /* NewCodeObj.proto */
12074
12074
  static PyObject* __Pyx_PyCode_New(
12075
- __Pyx_PyCode_New_function_description descr,
12076
- PyObject **varnames,
12075
+ const __Pyx_PyCode_New_function_description descr,
12076
+ PyObject * const *varnames,
12077
12077
  PyObject *filename,
12078
12078
  PyObject *funcname,
12079
12079
  const char *line_table,
@@ -12085,58 +12085,58 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) {
12085
12085
  PyObject* tuple_dedup_map = PyDict_New();
12086
12086
  if (unlikely(!tuple_dedup_map)) return -1;
12087
12087
  {
12088
- __Pyx_PyCode_New_function_description descr = {0, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 197, 2};
12089
- PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_y, __pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_q};
12088
+ const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 197, 2};
12089
+ PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_y, __pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_q};
12090
12090
  __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_varLib_iup_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad;
12091
12091
  }
12092
12092
  {
12093
- __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 378, 2};
12094
- PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_p};
12093
+ const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 378, 2};
12094
+ PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_p};
12095
12095
  __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_varLib_iup_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad;
12096
12096
  }
12097
12097
  {
12098
- __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 387, 2};
12099
- PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_d};
12098
+ const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 387, 2};
12099
+ PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_d};
12100
12100
  __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_varLib_iup_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad;
12101
12101
  }
12102
12102
  {
12103
- __Pyx_PyCode_New_function_description descr = {2, 0, 0, 14, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 91, 438};
12104
- PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_deltas, __pyx_mstate->__pyx_n_u_coords, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_indices, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_it, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_n_u_i1, __pyx_mstate->__pyx_n_u_i2, __pyx_mstate->__pyx_n_u_ri1, __pyx_mstate->__pyx_n_u_ri2, __pyx_mstate->__pyx_n_u_end, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_v};
12103
+ const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 14, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 91, 438};
12104
+ PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_deltas, __pyx_mstate->__pyx_n_u_coords, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_indices, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_it, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_n_u_i1, __pyx_mstate->__pyx_n_u_i2, __pyx_mstate->__pyx_n_u_ri1, __pyx_mstate->__pyx_n_u_ri2, __pyx_mstate->__pyx_n_u_end, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_v};
12105
12105
  __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_varLib_iup_py, __pyx_mstate->__pyx_n_u_iup_contour, __pyx_k_55Gq_3axs_Qa_uG1_q_1A_ar_S_Yaxs, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad;
12106
12106
  }
12107
12107
  {
12108
- __Pyx_PyCode_New_function_description descr = {3, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 143, 162};
12109
- PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_deltas, __pyx_mstate->__pyx_n_u_coords, __pyx_mstate->__pyx_n_u_ends, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_n_u_end, __pyx_mstate->__pyx_n_u_contour};
12108
+ const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 143, 162};
12109
+ PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_deltas, __pyx_mstate->__pyx_n_u_coords, __pyx_mstate->__pyx_n_u_ends, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_n_u_end, __pyx_mstate->__pyx_n_u_contour};
12110
12110
  __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_varLib_iup_py, __pyx_mstate->__pyx_n_u_iup_delta, __pyx_k_a_5_Cq_D_RuJcQSST_1A_5_2Rs_Bc_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad;
12111
12111
  }
12112
12112
  {
12113
- __Pyx_PyCode_New_function_description descr = {3, 0, 0, 24, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 202, 504};
12114
- PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_deltas, __pyx_mstate->__pyx_n_u_coords, __pyx_mstate->__pyx_n_u_tolerance, __pyx_mstate->__pyx_n_u_cj, __pyx_mstate->__pyx_n_u_dj, __pyx_mstate->__pyx_n_u_lcj, __pyx_mstate->__pyx_n_u_ldj, __pyx_mstate->__pyx_n_u_ncj, __pyx_mstate->__pyx_n_u_ndj, __pyx_mstate->__pyx_n_u_force, __pyx_mstate->__pyx_n_u_forced, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_ld, __pyx_mstate->__pyx_n_u_lc, __pyx_mstate->__pyx_n_u_d, __pyx_mstate->__pyx_n_u_c, __pyx_mstate->__pyx_n_u_nd, __pyx_mstate->__pyx_n_u_nc, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_c1, __pyx_mstate->__pyx_n_u_c2, __pyx_mstate->__pyx_n_u_d1, __pyx_mstate->__pyx_n_u_d2};
12113
+ const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 24, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 202, 504};
12114
+ PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_deltas, __pyx_mstate->__pyx_n_u_coords, __pyx_mstate->__pyx_n_u_tolerance, __pyx_mstate->__pyx_n_u_cj, __pyx_mstate->__pyx_n_u_dj, __pyx_mstate->__pyx_n_u_lcj, __pyx_mstate->__pyx_n_u_ldj, __pyx_mstate->__pyx_n_u_ncj, __pyx_mstate->__pyx_n_u_ndj, __pyx_mstate->__pyx_n_u_force, __pyx_mstate->__pyx_n_u_forced, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_ld, __pyx_mstate->__pyx_n_u_lc, __pyx_mstate->__pyx_n_u_d, __pyx_mstate->__pyx_n_u_c, __pyx_mstate->__pyx_n_u_nd, __pyx_mstate->__pyx_n_u_nc, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_c1, __pyx_mstate->__pyx_n_u_c2, __pyx_mstate->__pyx_n_u_d1, __pyx_mstate->__pyx_n_u_d2};
12115
12115
  __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_varLib_iup_py, __pyx_mstate->__pyx_n_u_iup_contour_bound_forced_set, __pyx_k_Q_3axs_Qa_1A_U_3axr_T_E_q_D_ar, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad;
12116
12116
  }
12117
12117
  {
12118
- __Pyx_PyCode_New_function_description descr = {5, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 293, 242};
12119
- PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_deltas, __pyx_mstate->__pyx_n_u_coords, __pyx_mstate->__pyx_n_u_forced, __pyx_mstate->__pyx_n_u_tolerance, __pyx_mstate->__pyx_n_u_lookback, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_best_cost, __pyx_mstate->__pyx_n_u_best_j, __pyx_mstate->__pyx_n_u_cost, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_costs, __pyx_mstate->__pyx_n_u_chain};
12118
+ const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 293, 242};
12119
+ PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_deltas, __pyx_mstate->__pyx_n_u_coords, __pyx_mstate->__pyx_n_u_forced, __pyx_mstate->__pyx_n_u_tolerance, __pyx_mstate->__pyx_n_u_lookback, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_best_cost, __pyx_mstate->__pyx_n_u_best_j, __pyx_mstate->__pyx_n_u_cost, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_costs, __pyx_mstate->__pyx_n_u_chain};
12120
12120
  __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_varLib_iup_py, __pyx_mstate->__pyx_n_u_iup_contour_optimize_dp, __pyx_k_q_a_1A_y_1_1_Q_c_c_U_3a_E_Bc_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad;
12121
12121
  }
12122
12122
  {
12123
- __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 346, 60};
12124
- PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_l, __pyx_mstate->__pyx_n_u_k, __pyx_mstate->__pyx_n_u_n};
12123
+ const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 346, 60};
12124
+ PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_l, __pyx_mstate->__pyx_n_u_k, __pyx_mstate->__pyx_n_u_n};
12125
12125
  __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_varLib_iup_py, __pyx_mstate->__pyx_n_u_rot_list, __pyx_k_1A_t1_q_1ARr_b_Bb, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad;
12126
12126
  }
12127
12127
  {
12128
- __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 356, 47};
12129
- PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_k, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_v};
12128
+ const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 356, 47};
12129
+ PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_k, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_v};
12130
12130
  __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_varLib_iup_py, __pyx_mstate->__pyx_n_u_rot_set, __pyx_k_t1_q_2Rr_Bb_E, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad;
12131
12131
  }
12132
12132
  {
12133
- __Pyx_PyCode_New_function_description descr = {3, 0, 0, 20, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 363, 522};
12134
- PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_deltas, __pyx_mstate->__pyx_n_u_coords, __pyx_mstate->__pyx_n_u_tolerance, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_d0, __pyx_mstate->__pyx_n_u_forced, __pyx_mstate->__pyx_n_u_k, __pyx_mstate->__pyx_n_u_chain, __pyx_mstate->__pyx_n_u_costs, __pyx_mstate->__pyx_n_u_solution, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_best_sol, __pyx_mstate->__pyx_n_u_best_cost, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_n_u_cost, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_i};
12133
+ const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 20, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 363, 522};
12134
+ PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_deltas, __pyx_mstate->__pyx_n_u_coords, __pyx_mstate->__pyx_n_u_tolerance, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_d0, __pyx_mstate->__pyx_n_u_forced, __pyx_mstate->__pyx_n_u_k, __pyx_mstate->__pyx_n_u_chain, __pyx_mstate->__pyx_n_u_costs, __pyx_mstate->__pyx_n_u_solution, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_best_sol, __pyx_mstate->__pyx_n_u_best_cost, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_n_u_cost, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_i};
12135
12135
  __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_varLib_iup_py, __pyx_mstate->__pyx_n_u_iup_contour_optimize, __pyx_k_Q_1A_A_q_r_A_q_q_a_q_Bay_A_881, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad;
12136
12136
  }
12137
12137
  {
12138
- __Pyx_PyCode_New_function_description descr = {4, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 464, 200};
12139
- PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_deltas, __pyx_mstate->__pyx_n_u_coords, __pyx_mstate->__pyx_n_u_ends, __pyx_mstate->__pyx_n_u_tolerance, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_n_u_end, __pyx_mstate->__pyx_n_u_contour};
12138
+ const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 464, 200};
12139
+ PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_deltas, __pyx_mstate->__pyx_n_u_coords, __pyx_mstate->__pyx_n_u_ends, __pyx_mstate->__pyx_n_u_tolerance, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_n_u_end, __pyx_mstate->__pyx_n_u_contour};
12140
12140
  __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_varLib_iup_py, __pyx_mstate->__pyx_n_u_iup_delta_optimize, __pyx_k_q_5_Cq_D_RuJcQSST_1A_5_2Rs_Bc_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad;
12141
12141
  }
12142
12142
  Py_DECREF(tuple_dedup_map);
@@ -13012,6 +13012,11 @@ static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *
13012
13012
  Py_DECREF(selfless_args);
13013
13013
  return result;
13014
13014
  }
13015
+ #elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000
13016
+ static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) {
13017
+ return _PyObject_Vectorcall
13018
+ (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames);
13019
+ }
13015
13020
  #else
13016
13021
  static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) {
13017
13022
  return
@@ -13335,7 +13340,9 @@ static int __Pyx_ParseKeywordDict(
13335
13340
  PyObject** const *name;
13336
13341
  PyObject** const *first_kw_arg = argnames + num_pos_args;
13337
13342
  Py_ssize_t extracted = 0;
13343
+ #if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
13338
13344
  if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
13345
+ #endif
13339
13346
  name = first_kw_arg;
13340
13347
  while (*name && num_kwargs > extracted) {
13341
13348
  PyObject * key = **name;
@@ -13383,7 +13390,9 @@ static int __Pyx_ParseKeywordDictToDict(
13383
13390
  PyObject** const *name;
13384
13391
  PyObject** const *first_kw_arg = argnames + num_pos_args;
13385
13392
  Py_ssize_t len;
13393
+ #if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
13386
13394
  if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
13395
+ #endif
13387
13396
  if (PyDict_Update(kwds2, kwds) < 0) goto bad;
13388
13397
  name = first_kw_arg;
13389
13398
  while (*name) {
@@ -15174,7 +15183,8 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
15174
15183
  if (unlikely(!empty_dict))
15175
15184
  goto bad;
15176
15185
  if (level == -1) {
15177
- if (strchr(__Pyx_MODULE_NAME, '.') != (0)) {
15186
+ const char* package_sep = strchr(__Pyx_MODULE_NAME, '.');
15187
+ if (package_sep != (0)) {
15178
15188
  module = PyImport_ImportModuleLevelObject(
15179
15189
  name, __pyx_mstate_global->__pyx_d, empty_dict, from_list, 1);
15180
15190
  if (unlikely(!module)) {
@@ -17103,7 +17113,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) {
17103
17113
  return PyLong_FromLong((long) value);
17104
17114
  } else if (sizeof(int) <= sizeof(unsigned long)) {
17105
17115
  return PyLong_FromUnsignedLong((unsigned long) value);
17106
- #ifdef HAVE_LONG_LONG
17116
+ #if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY
17107
17117
  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
17108
17118
  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
17109
17119
  #endif
@@ -17174,7 +17184,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) {
17174
17184
  return PyLong_FromLong((long) value);
17175
17185
  } else if (sizeof(long) <= sizeof(unsigned long)) {
17176
17186
  return PyLong_FromUnsignedLong((unsigned long) value);
17177
- #ifdef HAVE_LONG_LONG
17187
+ #if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY
17178
17188
  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
17179
17189
  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
17180
17190
  #endif
@@ -17796,8 +17806,8 @@ static void __Pyx__ReturnWithStopIteration(PyObject* value, int async) {
17796
17806
  PyObject *exc;
17797
17807
  PyObject *exc_type = async ? PyExc_StopAsyncIteration : PyExc_StopIteration;
17798
17808
  #if CYTHON_COMPILING_IN_CPYTHON
17799
- if ((PY_VERSION_HEX >= 0x030C00A6) || unlikely(PyTuple_Check(value) || PyExceptionInstance_Check(value))) {
17800
- if ((PY_VERSION_HEX >= 0x030e00A1)) {
17809
+ if ((PY_VERSION_HEX >= (0x030C00A6)) || unlikely(PyTuple_Check(value) || PyExceptionInstance_Check(value))) {
17810
+ if (PY_VERSION_HEX >= (0x030e00A1)) {
17801
17811
  exc = __Pyx_PyObject_CallOneArg(exc_type, value);
17802
17812
  } else {
17803
17813
  PyObject *args_tuple = PyTuple_New(1);
@@ -18162,17 +18172,19 @@ __Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen, PyObject** retval)
18162
18172
  static __Pyx_PySendResult
18163
18173
  __Pyx_Coroutine_SendToDelegate(__pyx_CoroutineObject *gen, __Pyx_pyiter_sendfunc gen_am_send, PyObject *value, PyObject **retval) {
18164
18174
  PyObject *ret = NULL;
18165
- __Pyx_PySendResult result;
18175
+ __Pyx_PySendResult delegate_result, result;
18166
18176
  assert(__Pyx_Coroutine_get_is_running(gen));
18167
- result = gen_am_send(gen->yieldfrom, value, &ret);
18168
- if (result == PYGEN_NEXT) {
18177
+ delegate_result = gen_am_send(gen->yieldfrom, value, &ret);
18178
+ if (delegate_result == PYGEN_NEXT) {
18169
18179
  assert (ret != NULL);
18170
18180
  *retval = ret;
18171
18181
  return PYGEN_NEXT;
18172
18182
  }
18173
- assert (result != PYGEN_ERROR || ret == NULL);
18183
+ assert (delegate_result != PYGEN_ERROR || ret == NULL);
18174
18184
  __Pyx_Coroutine_Undelegate(gen);
18175
- return __Pyx_Coroutine_SendEx(gen, ret, retval, 0);
18185
+ result = __Pyx_Coroutine_SendEx(gen, ret, retval, 0);
18186
+ Py_XDECREF(ret);
18187
+ return result;
18176
18188
  }
18177
18189
  #endif
18178
18190
  static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
@@ -18985,9 +18997,9 @@ static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt
18985
18997
  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
18986
18998
  #endif
18987
18999
  static PyObject* __Pyx_PyCode_New(
18988
- __Pyx_PyCode_New_function_description descr,
18989
- PyObject **varnames,
18990
- PyObject* filename,
19000
+ const __Pyx_PyCode_New_function_description descr,
19001
+ PyObject * const *varnames,
19002
+ PyObject *filename,
18991
19003
  PyObject *funcname,
18992
19004
  const char *line_table,
18993
19005
  PyObject *tuple_dedup_map
Binary file