googlefonts / googlefonts/fontc
fontc crashes on super bezier segments (3+ off-curve points before a curve)
- Dominant language
- Rust
- Stars
- 193
- Forks
- 21
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 60
Description
fontc rejects glyphs that contain "super bezier" segments (cubic curve segments with more than 2 consecutive off-curve control points). These exist in some sources, and are supported by fontmake.
```
python3 -m ttx_diff 'https://github.com/Omnibus-Type/Barrio?8f33bf10cb#Barriecito/sources/Barriecito.glyphs'
```
fontTools handles this via `decomposeSuperBezierSegment` in [`fonttools/Lib/fontTools/pens/basePen.py:389`](https://github.com/fonttools/fonttools/blob/57fb47/Lib/fontTools/pens/basePen.py#L389-L421). When `BasePen.curveTo` receives more than 3 points (i.e. more than 2 control points), it decomposes the super bezier into multiple standard cubic bezier segments that together reproduce the same curve.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.