GlyphPact: a local SVG-to-Flutter icon compiler with stable codepoints

I have released GlyphPact v1.0.1, an MIT-licensed command-line compiler for teams that keep custom Flutter icons in their repository.

GlyphPact turns a directory of SVG files into a val


idated OpenType/CFF font and a const Dart IconData provider. The part that motivated the project is the generated iconfont.lock.json.

Icon codepoints are an application-facing API. If regeneration changes an existing assignment, valid Dart code can silently render the wrong glyph. GlyphPact reads the committed lock on every build, keeps existing assignments fixed, leaves tombstones for removed icons, and recovers unique content-preserving renames.

The compiler is strict about SVG fidelity:

  • lossless normalization runs automatically
  • known deterministic approximations require --lossy convert
  • omission requires the separate --unrepresentable skip permission
  • malformed, unsafe, unknown, and resource-exhausting input always fails

The complete artifact set is staged and validated before publication, so a failed build does not replace the last valid output. CI can use --check to rebuild a candidate and report stale committed artifacts without rewriting them.

Install:

uv tool install glyphpact

Compile a Flutter icon pack:

glyphpact assets/icons \
  --output lib/generated/app_icons \
  --name AppIcons

GlyphPact runs locally. There is no SVG upload or hosted project file.

I would appreciate feedback from people maintaining icon packs across several app releases. Small SVG fixtures that expose an unsupported feature or unclear diagnostic are especially useful.