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.
This commit is contained in:
1 parent
3145e38211
commit
6eba51701a
1 file changed
+2
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user