mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-09 14:14:02 +00:00
A cubic whose second control point is its end point (as the `y` operator builds, ISO 32000-2 8.5.2.1 Table 58) has a zero derivative at its end. kurbo 0.13.1's offset curve looks for cusps with a root search on the curvature, which grows without bound towards that end; at some widths the search stops on the end point and normalising the zero tangent there gives NaN. vello_common's fill drops any outline with NaN, so the whole stroke vanished (a two-curve `y` path drew nothing at 16, 32 and 63 pt; a PDFBox tracker file lost its 32 pt "XX" outline). The NaN fallback that #4913 added to `flatten::stroke` now also moves such a control point the stroke tolerance towards the previous control point before stroking again (the curve moves by at most 4/9 of the tolerance). Outlines that come back finite take the old path unchanged. The vendor ledger row also gets back #4913's entry, which a merge had dropped. Claude-Session: https://claude.ai/code/session_01Pq7HyCHD1R3rywQBPCHXZA Co-authored-by: mtlcl410 <chuanlin@niar.org.tw> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>