# unstroke

> Convert stroked SVG icons into filled outlines. Every stroke becomes a filled shape, overlaps are merged with a real boolean union, and each icon comes out as one clean path.

unstroke is a TypeScript library and CLI (npm: unstroke) that converts stroked SVG icons into filled outlines: every stroke becomes a filled shape, overlaps are merged with a boolean union on an integer grid, and the result is one path per icon, refitted with cubic Béziers. Use it for icon fonts, PDF export, laser cutting and design tools without stroke support.

## Table of Contents

### Guide

- [Getting started](https://unstroke.vercel.app/guide/getting-started.md): Install unstroke and convert your first stroked SVG icon to a filled outline, from the command line or from Node.
- [Command line](https://unstroke.vercel.app/guide/cli.md): Convert whole folders of stroked SVG icons to filled outlines with the unstroke CLI, including in-place conversion, stroke width overrides and SVGO optimization.
- [API](https://unstroke.vercel.app/guide/api.md): The unstroke Node API. outlineSvg converts a whole SVG document, outlinePathData converts a single path data string, both with the same options.
- [Optimizing the output](https://unstroke.vercel.app/guide/optimize.md): Shrink unstroke output by about a quarter with the bundled SVGO pass, or plug the same configuration into your own SVGO pipeline.

### Reference

- [Options](https://unstroke.vercel.app/reference/options.md): Every option accepted by outlineSvg, outlinePathData and the unstroke CLI, with defaults.
- [Lower-level API](https://unstroke.vercel.app/reference/lower-level.md): The unstroke pipeline exposed piece by piece, from parsing SVG through flattening, stroking and union to path data, for tools that need geometry rather than markup.
- [What is supported](https://unstroke.vercel.app/reference/supported.md): The SVG elements, stroke styles, transforms, fill rules and CSS features unstroke understands, and the ones it doesn't handle yet.
- [How it works](https://unstroke.vercel.app/reference/how-it-works.md): How unstroke turns a stroked SVG into one filled path in six steps, and why it unions polygons on an integer grid instead of running boolean operations on curves.
- [Alternatives and output size](https://unstroke.vercel.app/reference/alternatives.md): unstroke measured against Skia PathOps, Paper.js, FontForge, svg-outline-stroke and a production webfont pipeline on 203 icons, by file size, curve count and pixel accuracy.

### Development

- [Development](https://unstroke.vercel.app/development.md): How to work on unstroke. Repository layout, the fixture tests with pixel comparison, the diff tools, how the docs and demo are built, and how releases are cut with Changesets and npm Trusted Publishing.

