ISO 32000-2 §8.5.2.1, Table 58: h "terminates the current subpath.
Appending another segment to the current path shall begin a new subpath,
even if the new segment begins at the endpoint reached by the h
operation." kurbo carries a segment after ClosePath on from the subpath
start without a MoveTo, so resolve_degenerate_subpaths saw "h" then an "l"
back to that point as part of the closed subpath, and the round-cap dot
of that degenerate subpath was lost (main drew it, through the nudge this
PR removed). l, c, v and y after h now start with a MoveTo to the point h
reached.
Review on #4410 (CodeRabbit, vendor/hayro-interpret/src/interpret/mod.rs).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
Vendored hayro-interpret patch 61.
- A degenerate subpath (a single-point closed path, or points that all
coincide) is stroked as a dot of the line width with round caps and not
at all with butt or projecting square caps (8.5.3.2). The zero-length
`l` is no longer nudged a ten-thousandth of a point (which gave square
caps a direction to draw a square in), and `x y m h` keeps its `h`
(kurbo's `is_empty` counts only segments, so it was dropped and the
subpath painted nothing). Other subpaths and zero-length dashes are
untouched.
- A dash array that is all zero, or has a negative or non-finite entry,
is kept as `[]`, a solid line (8.4.3.6). `[0 0]` used to become
`[0.01 0.01]`, a faint half-covered line.
- A negative or non-finite line width from `w` or `/LW` is kept as 0,
the thinnest line (8.4.3.2), so no device sees a width below zero. The
renderer already drew it as a one-pixel line in the stroke colour.
Tests: crates/render/tests/it/stroke_geometry.rs (pixel checks and a
recording device).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175FWj4xFhMhSH3UpMU8DSC