Skip to content

Port the icons off the archived go-iconoir - #276

Merged
tannevaled merged 1 commit into
mainfrom
drop-archived-iconoir
Aug 30, 2026
Merged

Port the icons off the archived go-iconoir#276
tannevaled merged 1 commit into
mainfrom
drop-archived-iconoir

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

go-iconoir is archived; its two halves live apart now — go-icons/iconoir ships the pack as SVG source and toolkit.SVGIcon rasterises it, caching per (document, ink). The twenty glyph vars hold documents instead of *iconoir.Icon, resolved through a local mustIcon that keeps MustGet's contract.

Needs toolkit v0.293.0, which carries go-gfx/gfx#33 — without it the rasteriser ignores the root <svg>'s fill="none" and every closed Iconoir path renders filled.

Two test changes, both forced by measurement:

  • TestDrawIconsPaintAA demanded a soft edge from every glyph. Iconoir's menu is three horizontal 1.5px rules that land on whole pixels at this size, so a correct rasteriser produces no partial coverage — measured: it paints exactly one colour across 168 pixels, while lock and user each paint a dozen-plus coverage steps. The expectation is per-glyph now, with the reason recorded beside it. Control run: a flat filled box still turns the test red, so it has not been weakened.
  • TestUnknownIconName asserted the lookup and stopped, leaving its painter unused and its "painted nothing" check vacuous. It now draws the empty document through drawIcon, exercising the miss path where it runs.

Verified with build, vet and tests across all 28 packages. No signed bundle is produced here — that is nr-build's job and is unaffected by a dependency change.

🤖 Generated with Claude Code

go-iconoir is archived and its two halves live apart now: go-icons/iconoir ships
the pack as SVG source, toolkit.SVGIcon rasterises it and caches per (document,
ink). The twenty glyph vars hold documents instead of *iconoir.Icon, resolved
through a local mustIcon that keeps MustGet's contract, and drawIcon hands one to
SVGIcon.

Two test changes, both forced by measurement rather than by taste:

TestDrawIconsPaintAA demanded a soft edge from every glyph. Iconoir's "menu" is
three horizontal 1.5px rules that land on whole pixels at this size, so a correct
rasteriser gives no partial coverage: it paints exactly one colour across 168
pixels, where "lock" and "user" each paint a dozen-plus coverage steps. The
expectation is now per-glyph, and the reason is recorded next to it. A control run
with a flat filled box still turns the test red, so it has not been weakened.

TestUnknownIconName asserted the pack lookup and stopped there, which left its
painter unused and its "painted nothing" check vacuous. It now draws the empty
document through drawIcon, so the miss path is exercised where it actually runs.

Verified with go build/vet/test across all 28 packages. This does not produce a
signed bundle — that is nr-build's job and is unaffected by a dependency change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@tannevaled
tannevaled force-pushed the drop-archived-iconoir branch from 3dcd6ac to 397b41e Compare August 30, 2026 20:22
@tannevaled
tannevaled merged commit 5822304 into main Aug 30, 2026
13 checks passed
@tannevaled
tannevaled deleted the drop-archived-iconoir branch August 30, 2026 20:28
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