Skip to content

fix(symbols): render S-101 even-odd danger symbols with their holes#19

Merged
beetlebugorg merged 1 commit into
mainfrom
fix/isodgr-evenodd-symbols
Jun 26, 2026
Merged

fix(symbols): render S-101 even-odd danger symbols with their holes#19
beetlebugorg merged 1 commit into
mainfrom
fix/isodgr-evenodd-symbols

Conversation

@beetlebugorg

Copy link
Copy Markdown
Owner

Every S-101 symbol is authored with fill-rule="evenodd", but the symbol rasterizer ignored it: oksvg never parses fill-rule and rasterx's ScannerGV.SetWinding is a no-op (nonzero-only). So compound glyphs like ISODGR01/DANGER0x — an outer body with an inner subpath meant to be a hole — filled solid, e.g. an ISODGR01 with no star in it.

Force even-odd winding on every parsed path and rasterize through scanFT (freetype-backed, pure Go / CGO-free), whose SetWinding honours even-odd. For simple non-self-intersecting paths even-odd and nonzero are identical, so the rest of the catalogue is unaffected.

Adds a self-contained regression test (no catalogue needed).

Every S-101 symbol is authored with fill-rule="evenodd", but the symbol
rasterizer ignored it: oksvg never parses fill-rule and rasterx's
ScannerGV.SetWinding is a no-op (nonzero-only). So compound glyphs like
ISODGR01/DANGER0x — an outer body with an inner subpath meant to be a
hole — filled solid, e.g. an ISODGR01 with no star in it.

Force even-odd winding on every parsed path and rasterize through scanFT
(freetype-backed, pure Go / CGO-free), whose SetWinding honours even-odd.
For simple non-self-intersecting paths even-odd and nonzero are identical,
so the rest of the catalogue is unaffected.

Adds a self-contained regression test (no catalogue needed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@beetlebugorg beetlebugorg merged commit 51a1c0c into main Jun 26, 2026
4 checks passed
@beetlebugorg beetlebugorg deleted the fix/isodgr-evenodd-symbols branch June 26, 2026 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant