Bulk SVG workflow
Convert a folder of SVGs to Flutter icons
Point one local CLI at an SVG directory. GlyphPact discovers nested files, audits what an icon font cannot preserve, and generates an OpenType font, const Flutter IconData, a stable codepoint lock, and a machine-readable report.
assets/icons/**audit + compilefont + IconDatalock + report
Recursive input. Reviewable output. No upload step.
Local CLI
From an SVG folder to Flutter IconData
There is no upload queue and no repeated drag-and-drop session. The directory stays the source of truth.
1. Install and compile
uv tool install glyphpactInstalls the latest stable release from PyPI, currently v1.1.0. Already installed? Run uv tool upgrade glyphpact. Release notes.
glyphpact assets/icons \ --output lib/generated/app_icons \ --name AppIcons
2. Keep the workflow in the repository
Check in a config when the paths and policies should be identical for every developer, build runner, and coding agent.
{
"input": "assets/icons",
"output": "lib/generated/app_icons",
"fontFamily": "AppIcons",
"className": "AppIcons",
"policy": {
"lossy": "error",
"unrepresentable": "error"
}
}Discovery is recursive. Files such asassets/icons/navigation/back.svg andassets/icons/status/verified.svg can stay in meaningful folders. Their normalized relative paths become stable source identities instead of being flattened into one browser selection.
Need the application wiring after generation?Register the font and use the generated IconData in Flutter.
Before generation
Audit a large pack through MCP before generating the font
An SVG that looks correct in Figma or a browser is not automatically a faithful monochrome font glyph.
audit_icon_pack({
"input_path": "/absolute/path/to/assets/icons",
"limit": 100
})GlyphPact classifies each source as lossless, deterministically approximable, or unrepresentable. Strict defaults fail on the last two outcomes. Nothing is silently accepted just because a pack is large.
Keep multicolour artwork, gradients, filters, and animation as SVG assets when their meaning depends on those features. An icon font is a monochrome runtime representation, not a universal SVG container.
Generated contract
Commit more than the font file
The Dart provider is only one output. The lock and report are what make later updates reviewable and checkable.
Repeated Figma deliveries
Three icons become five, ten, then one hundred
Existing assignments should not be recalculated every time design hands over another batch.
- 3first delivery
- 5two additions
- 10another batch
- 100the project scales
GlyphPact reuses every assignment already recorded iniconfont.lock.json. Only new source identities receive unused codepoints. Deleted icons leave tombstones, so a value that shipped once cannot later mean a different picture.
See how to add Flutter icons without changing existing codepoints.
Automation
Use the same inputs in CI and through MCP
Fail CI on stale output
--check rebuilds a candidate artifact set without rewriting the owned output. Exit code 3 means the committed font, provider, lock, or report no longer matches its sources.
- name: Verify generated Flutter icons run: glyphpact --config icon_font.json --check --json
Let an agent audit before it builds
The local MCP server exposes read-only audit, build, staleness check, and paged report tools. An agent can inspect a large pack in bounded pages, ask before changing fidelity policy, build, and verify the published artifacts without opening a browser.
A 100,000-icon catalogue needs more than one font
One OpenType font can contain at most65,534 usable glyphs. GlyphPact enforces that limit. The default BMP private use range,U+E000 - U+F8FF, is smaller:6,400 lifetime assignments including tombstones.
A complete supplementary private use range provides up to65,534 assignments. A catalogue beyond that must be sharded into independently named and versioned fonts. Do not change the starting codepoint of an established lock to make space.
A directory near 100,000 entries also approaches the default discovery work limit, which counts filesystem entries rather than only SVG files. Split intentionally and benchmark the real corpus. File count alone does not predict compile time or runtime cost.
Choosing a generator
Local CLI or browser-based SVG-to-icon generator
GlyphPact is an offline Flutter icon-font generator for repositories. Other tools are better for visual selection or web output.
FlutterIcon.com
Convenient for browsing bundled icon packs and making an occasional Flutter export in a browser. Use GlyphPact when the SVG folder changes repeatedly and CI must prove committed output is current.
FlutterIcon.com alternative and tested SVG comparisonIcoMoon
The current IcoMoon app supports Flutter output, folder import, offline-first use, and a visual editor. GlyphPact’s distinction is the repository lock, typed reports, deterministic compiler, and first-party staleness check.
IcoMoon alternative for repository-managed iconsFontello
Fontello provides a browser catalogue, a developer API, and third-party CLI tooling. GlyphPact is the narrower choice when source SVGs, stable Flutter IconData, and generated artifacts should live in one local build contract.
flutter_svg
Keep artwork as SVG assets when it needs multiple colours, gradients, filters, animation, or independent scaling. Use an icon font for monochrome interface symbols that should behave throughIconData and IconTheme.
Start locally
Audit the folder you already have
uv tool install glyphpactInstalls the latest stable release from PyPI, currently v1.1.0. Already installed? Run uv tool upgrade glyphpact. Release notes.
Source SVGs are read from disk. Compilation does not upload artwork or require a hosted project.