From caa0c81b73f5852df2a1cd16288c95c7f7571516 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 20 Feb 2023 12:25:37 -0700 Subject: [PATCH] [qu2cu] Better initial condition --- Lib/fontTools/qu2cu/qu2cu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/fontTools/qu2cu/qu2cu.py b/Lib/fontTools/qu2cu/qu2cu.py index ffe9d9402..ccd0b248f 100644 --- a/Lib/fontTools/qu2cu/qu2cu.py +++ b/Lib/fontTools/qu2cu/qu2cu.py @@ -253,7 +253,7 @@ def spline_to_curves(q, costs, tolerance=0.5, all_cubic=False): # cubic curves, and within those the one with smallest error. sols = [Solution(0, 0, 0, False)] for i in range(1, len(elevated_quadratics) + 1): - best_sol = Solution(len(q) + 4, 0, 1, False) # Impossible + best_sol = Solution(len(q) * 4 + 1, 0, 1, False) # Impossible for j in range(0, i): j_sol_count, j_sol_error = sols[j].num_points, sols[j].error