Closed rsheeter closed 1 year ago
The offending contour is in GoogleSans-opsz18-wght380-GRAD-50.ufo/glyphs/tzaa-ethiopic.glif, here's an excerpt:
<contour>
<point x="109" y="720"/>
<point x="30" y="649"/>
<point x="30" y="521" type="curve" smooth="yes"/>
[...]
<point x="405" y="658"/>
<point x="346" y="720"/>
<point x="228" y="720" type="curve" smooth="yes"/>
</contour>
looks like we don't add an inital MoveTo when the glif contour begin with off-curves like in this case, here's the generated IR generated from the above, which is missing the initial MoveTo and causing the panic:
contours:
- - !CurveTo
- x: 109.0
y: 720.0
- x: 30.0
y: 649.0
- x: 30.0
y: 521.0
[...]
- !CurveTo
- x: 405.0
y: 658.0
- x: 346.0
y: 720.0
- x: 228.0
y: 720.0
when compiling in debug mode, kurbo contains debug_assert! statements that ensure that a valid BezPath always starts with a MoveTo. The OP run fontc as cargo run --release
hence these were skipped, but then we panic later on in fontbe/glyphs.rs when converting curves to quadratics
https://github.com/googlefonts/googlesans/issues/586