Skip to content
GlyphPact
Menu

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.

Folder to FlutterOne repository-controlled pipeline
Local repository build
  1. assets/icons/**
  2. audit + compile
  3. font + IconData
  4. lock + 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 glyphpact

Installs the latest stable release from PyPI, currently v1.1.0. Already installed? Run uv tool upgrade glyphpact. Release notes.

bash
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.

icon_font.json
{
  "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.

Read-only MCP tool call
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.

lib/generated/app_icons/
fonts/AppIcons.otfframework-neutral Validated OpenType/CFF font. Framework-neutral.
iconfont.lock.jsonframework-neutral Codepoint registry and provenance. Schema version 1. Commit this.
app_icons.dartFlutter only const Flutter IconData provider and optional name-keyed catalog. Dart-specific.
layer_fonts/layer_*.otfframework-neutral Optional solid-alpha paint-order layers, for icons that opt in.
iconfont.report.jsonbuild metadata Deterministic build report and stable code-generation input. Schema version 3.
ATTRIBUTION.mdbuild metadata Declared artwork authorship, licences, and unattributed count.
.glyphpact.jsonbuild metadata Ownership marker. GlyphPact refuses to overwrite a directory without it.
../.app_icons.glyphpact.lockPublication coordination file. A sibling of the output directory, not part of the owned tree. Leave it in place and ignore it in version control.

Repeated Figma deliveries

Three icons become five, ten, then one hundred

Existing assignments should not be recalculated every time design hands over another batch.

  1. 3first delivery
  2. 5two additions
  3. 10another batch
  4. 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.

.github/workflows/ci.yml
- 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.

Configure SVG-to-Flutter icon automation with MCP.

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 comparison

IcoMoon

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 icons

Fontello

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 glyphpact

Installs 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.

FAQ

Bulk SVG conversion questions

Can GlyphPact convert a folder of SVGs to Flutter IconData?

Yes. Point the GlyphPact CLI at an SVG directory and choose an output directory and class name. One build emits an OpenType/CFF icon font, a const Flutter IconData provider, iconfont.lock.json, iconfont.report.json, and ATTRIBUTION.md.

The generated output is meant to be committed. Later builds reuse the lock so adding another SVG batch does not renumber existing IconData constants.

Bulk SVG workflow

Does GlyphPact scan nested SVG folders recursively?

Yes. GlyphPact discovers .svg files recursively below the input directory and uses normalized relative paths as source identities. A pack can keep folders such as navigation, status, and social without flattening them before compilation.

Run an audit first when a large pack comes from several designers. The report groups typed findings by source file, and the same directory can then be compiled through the CLI or MCP server.

Can GlyphPact convert 100,000 SVGs into one icon font?

No single GlyphPact font can contain 100,000 usable icon glyphs. GlyphPact enforces the OpenType ceiling of 65,534 usable glyphs per font. The default BMP private use range is smaller, with 6,400 lifetime assignments, and tombstones consume slots because codepoints are never reused.

A complete supplementary private use range provides up to 65,534 assignments. Larger catalogues must be divided into independently versioned fonts. File count alone does not predict build time, so benchmark the real SVG corpus instead of relying on a headline throughput claim.

What does FlutterIcon.com’s “convert to compound path manually” warning mean?

FlutterIcon.com may show: “If image looks not as expected please convert to compound path manually. Skipped tags and attributes: ...” It is an importer warning, not proof that the source SVG is invalid.

An icon font needs glyph outlines. Expanding strokes and flattening artwork into paths can help when tags or attributes cannot be translated, but it is not a universal fix for every valid SVG or every fill-rule problem. Test the generated font in Flutter, not only the browser preview.

Tested FlutterIcon.com comparison

Is GlyphPact a Fontello alternative?

Yes for local, repository-controlled Flutter icon generation. GlyphPact compiles your SVG sources locally, keeps codepoints in a committed lock, audits unsupported SVG features, and checks generated output in CI.

Fontello is a better fit when you want its browser catalogue and web-font export workflow. Fontello also has a developer API and third-party CLI tooling, so the distinction is not “automation versus no automation.” The distinction is a first-party repository build and staleness check.

Should I use an icon font or flutter_svg?

Use an icon font when the artwork is monochrome, is reused throughout the interface, and should behave like text through IconData, IconTheme, and font subsetting. Use flutter_svg when an image needs multiple colours, gradients, filters, animation, or other SVG semantics that a monochrome glyph cannot preserve.

For mixed packs, audit first and keep unsuitable artwork as SVG assets. Converting every file is not the goal; choosing a faithful runtime representation is.