From 6eba51701a5385b4e08ee1c371eefd481659dc1c Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Tue, 27 Oct 2026 21:38:34 +0800 Subject: [PATCH] fix(fonttools): record the TrueType on-curve flag per point _pon was never written, so every point was treated as off-curve and all straight edges/corners were flattened through the quadratic path. Set _pon from bit 0 of each parsed glyph flag, including repeated flags. --- vpsdk/fonttools/fonttools.vp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vpsdk/fonttools/fonttools.vp b/vpsdk/fonttools/fonttools.vp index c9a810e..3009083 100644 --- a/vpsdk/fonttools/fonttools.vp +++ b/vpsdk/fonttools/fonttools.vp @@ -361,6 +361,7 @@ def _add_glyph(font: Font*, gid: int, a: float, b: float, c: float, d: float, tx f: uint8 = _u8(base, p) p += 1 _flags[i] = f + _pon[i] = f & 1 i += 1 if f & 8: rep: int = int(_u8(base, p)) @@ -368,6 +369,7 @@ def _add_glyph(font: Font*, gid: int, a: float, b: float, c: float, d: float, tx for k in range(rep): if i < npts: _flags[i] = f + _pon[i] = f & 1 i += 1 x: int = 0 for i in range(npts):