Package selection guidance compiled from public package information, community data, and project usage.
Fontify converts SVG icons into OTF fonts and generates a Flutter-compatible Dart class for easy integration. It provides both a command-line interface (CLI) and an API, enabling developers to bundle custom icons as fonts within their Flutter applications. This streamlines icon management by reducing the need for multiple image assets and improving performance through font-based rendering. The tool is particularly useful for projects requiring custom or branded icon sets.
Use cases
Creating custom icon fonts from SVGs
Integrating branded icons in Flutter apps
Reducing app bundle size with font-based icons
Automating icon font generation in CI/CD pipelines
Key features
SVG to OTF font conversion
Flutter class generation
CLI and API support
Supports custom icon naming
Optimized for Flutter performance
Suitable for
Flutter developers needing custom icons
Teams managing large icon sets
Projects aiming to minimize asset overhead
Considerations
Requires SVG files as input
Limited to font-based icon rendering
No built-in icon editing tools
Not suitable for dynamic icon changes at runtime
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
Fontify
The Fontify package provides an easy way to convert SVG icons to OpenType font
and generate Flutter-compatible class that contains identifiers for the icons
(just like CupertinoIcons or Icons classes).
The package is written fully in Dart and doesn't require any external dependency.
Compatible with dart2js and dart2native.
SVG transforms are applied to paths according to specs.
SVG <g> element's children are expanded to the root with transformations applied.
Anything else related to the group is ignored and group referencing is not supported.
When ignoreShapes is set to false,
every SVG shape's (circle, rect, etc.) outline is converted to path.
Note that any attributes like "fill" or "stroke" are ignored and only the outline is used,
so the resulting glyph may look different from SVG icon.
It's recommended to convert every element in SVG to path.
When normalize is set to false, it's recommended that SVG icons have the same height.
Otherwise, final result might not look as expected.
When Flutter class is generated, static variables names derive from SVG file name
converted to pascal case with non-allowed characters removed.
Name is set to 'unnamed', if it's empty.
Suffix '_{i+1}' is added, if name already exists.
Planned
Support svg-to-ttf conversion (cubic-to-quad curves approximation needs to be done).
Support ligatures.
Support font variations.
Contributing
Any suggestions, issues, pull requests are welcomed.