Skip to content
/ oksvg Public
forked from srwiley/oksvg

Partial implementation of SVG 2.0 specification in golang.

License

Notifications You must be signed in to change notification settings

fyne-io/oksvg

This branch is 11 commits ahead of srwiley/oksvg:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d58259e · Apr 12, 2025
Feb 9, 2021
Oct 2, 2022
Jan 28, 2022
May 5, 2018
Apr 12, 2025
Jan 28, 2022
Oct 11, 2022
Mar 30, 2025
Mar 30, 2025
Mar 30, 2025
Oct 11, 2022
Mar 30, 2025
Mar 30, 2025
Mar 30, 2025
Jan 28, 2022
Jan 28, 2022
Mar 30, 2025
Nov 29, 2018
Mar 30, 2025

Repository files navigation

oksvg

Oksvg is a rasterizer for a partial implementation of the SVG2.0 specification in Go.

Although many SVG elements will not be read by oksvg, it is good enough to faithfully produce thousands, but certainly not all, SVG icons available both for free and commercially. A list of valid and invalid elements is in the doc folder.

The package can be installed by running:

go get github.com/fyne-io/oksvg@latest

Oksvg uses the rasterx rasterizer package which implements full SVG2.0 path functions, including the newer 'arc' join-mode.

arcs and caps

Extra non-standard features

In addition to 'arc' as a valid join mode value, oksvg also allows 'arc-clip' which is the arc analog of miter-clip and some extra capping and gap values. It can also specify different capping functions for line starts and ends.

Rasterizations of SVG to PNG from creative commons 3.0 sources

Example renderings of unedited open source SVG files by oksvg and rasterx are shown below.

Thanks to Freepik from Flaticon Licensed by Creative Commons 3.0 for the example icons shown below, and also used as test icons in the testdata folder.

Jupiter

lander

mountains

bus

About

Partial implementation of SVG 2.0 specification in golang.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%