Skip to content

Rasterise SVG with go-gfx/oksvg: clipPath, multi-set arcs - #298

Merged
tannevaled merged 1 commit into
mainfrom
oksvg-fork
Oct 19, 2026
Merged

tannevaled merged 1 commit into
mainfrom
oksvg-fork

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

Switches the SVG rasteriser from srwiley/oksvg (last commit 2022-10-11, no clipPath) to its fleet fork go-gfx/oksvg v0.1.0, which implements clipPath (go-gfx/oksvg#2) and fixes arc commands with several parameter sets (twemoji's 🪇 was 45.7% of pixels off Chrome, now 0.03%).

The change here is the import path in svg.go and svg_test.go, go.mod/go.sum, one test (svg_clip_test.go: a clipped rect through RasterizeSVG), and the two doc lines that said oksvg has no clipPath. No engine logic changes; the engine package tests pass.

Measured on the 4009 Twemoji graphics at 72 px, interleaved rounds: 1.17 to 1.21 s before and after (no slowdown without clipPath); 212 of them draw differently now (the arc fix: flags, runners, ...).

🤖 Generated with Claude Code

…al parameter sets

The import and the requirement change from srwiley/oksvg (unmaintained since
2022, no clipPath) to its fleet fork go-gfx/oksvg, which adds clipPath and
fixes arc commands with several parameter sets. No engine logic changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit c26488f into main Oct 19, 2026
13 of 14 checks passed
@tannevaled
tannevaled deleted the oksvg-fork branch October 19, 2026 20:10
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