From 28a011ca9ec1ac5cb13e4d7a0a06ce13b99eca87 Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Tue, 27 Oct 2026 21:42:19 +0800 Subject: [PATCH] fix(fonttools): stop the contour walk at the closing point When an off-curve run ended on first_on, the walk set cur=first_on and wrapped past it, repeating the contour and overflowing the edge table. Break immediately after drawing the closing quadratic. --- vpsdk/fonttools/fonttools.vp | 1 + 1 file changed, 1 insertion(+) diff --git a/vpsdk/fonttools/fonttools.vp b/vpsdk/fonttools/fonttools.vp index 3009083..eb0fd74 100644 --- a/vpsdk/fonttools/fonttools.vp +++ b/vpsdk/fonttools/fonttools.vp @@ -240,6 +240,7 @@ def _build_contour(start: int, end: int): cx = _px[nn] cy = _py[nn] cur = nn + if nn == first_on: break else: mx: float = (_px[ctrl] + _px[nn]) / 2.0 my: float = (_py[ctrl] + _py[nn]) / 2.0