{"id":28583421,"url":"https://github.com/scerio/icon_font_generator","last_synced_at":"2026-01-17T10:57:34.204Z","repository":{"id":35035080,"uuid":"198997019","full_name":"ScerIO/icon_font_generator","owner":"ScerIO","description":"☣️ Flutter Icon Font Generator","archived":false,"fork":false,"pushed_at":"2024-03-10T14:40:30.000Z","size":306,"stargazers_count":106,"open_issues_count":25,"forks_count":56,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T08:36:51.452Z","etag":null,"topics":["flutte-icons","flutter","flutter-svg","generated-icons","ttf"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/icon_font_generator","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ScerIO.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-26T10:22:55.000Z","updated_at":"2025-03-17T01:26:42.000Z","dependencies_parsed_at":"2024-06-19T06:14:42.981Z","dependency_job_id":"fef5c560-46d7-4a12-b2d0-2a8c3970b2f0","html_url":"https://github.com/ScerIO/icon_font_generator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScerIO%2Ficon_font_generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScerIO%2Ficon_font_generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScerIO%2Ficon_font_generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScerIO%2Ficon_font_generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ScerIO","download_url":"https://codeload.github.com/ScerIO/icon_font_generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScerIO%2Ficon_font_generator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259204802,"owners_count":22821160,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flutte-icons","flutter","flutter-svg","generated-icons","ttf"],"created_at":"2025-06-11T05:08:17.799Z","updated_at":"2026-01-17T10:57:34.192Z","avatar_url":"https://github.com/ScerIO.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# icon_font_generator\n\n[![pub package](https://img.shields.io/pub/v/icon_font_generator.svg)](https://pub.dartlang.org/packages/icon_font_generator)\n\nThe icon_font_generator package provides an easy way to convert SVG icons to OpenType font\nand generate Flutter-compatible class that contains identifiers for the icons \n(just like [CupertinoIcons][] or [Icons][] classes).\n\nThe package is written fully in Dart and doesn't require any external dependency.\nCompatible with dart2js and dart2native.\n\n[CupertinoIcons]: https://api.flutter.dev/flutter/cupertino/CupertinoIcons-class.html\n[Icons]: https://api.flutter.dev/flutter/material/Icons-class.html\n\n## Font generation\n\n### Install via dev dependency\n\n```shell\n$ flutter pub add --dev icon_font_generator\n\n# And it's ready to go:\n$ flutter pub run icon_font_generator:generate \u003cinput-svg-dir\u003e \u003coutput-font-file\u003e [options]\n```\n\n### or [Globally activate][] the package:\n\n[globally activate]: https://dart.dev/tools/pub/cmd/pub-global\n\n```shell\n$ pub global activate icon_font_generator\n\n# And it's ready to go:\n$ icon_font_generator \u003cinput-svg-dir\u003e \u003coutput-font-file\u003e [options]\n```\n\nRequired positional arguments:\n- `\u003cinput-svg-dir\u003e`\nPath to the input directory that contains .svg files.\n- `\u003coutput-font-file\u003e`\nPath to the output font file. Should have .otf extension.\n\nFlutter class options:\n- `-o` or `--output-class-file=\u003cpath\u003e`\nOutput path for Flutter-compatible class that contains identifiers for the icons.\n- `-c` or `--class-name=\u003cname\u003e`\nName for a generated class.\n- `-p` or `--package=\u003cname\u003e`\nName of a package that provides a font. Used to provide a font through package dependency.\n- `--[no-]format`\nFormat dart generated code.\n\nFont options:\n- `-f` or `--font-name=\u003cname\u003e`\nName for a generated font.\n- `--[no-]normalize`\nEnables glyph normalization for the font.\nDisable this if every icon has the same size and positioning.\n(defaults to on)\n- `--[no-]ignore-shapes`\nDisables SVG shape-to-path conversion (circle, rect, etc.).\n(defaults to on)\n\nOther options:\n- `-z` or `--config-file=\u003cpath\u003e`\nPath to icon_font_generator yaml configuration file.\npubspec.yaml and icon_font.yaml files are used by default.\n- `-r` or `--recursive`\nRecursively look for .svg files.\n- `-v` or `--verbose`\nDisplay every logging message.\n- `-h` or `--help`\nShows usage information.\n\n*Usage example:*\n\n```shell\n$ icon_font_generator assets/svg/ fonts/my_icons_font.otf --output-class-file=lib/my_icons.dart -r\n```\n\nUpdated Flutter project's pubspec.yaml:\n\n```yaml\nflutter:\n  fonts:\n    - family: My Icons\n      fonts:\n        - asset: fonts/my_icons_font.otf\n```\n\n## Config file\n\nicon_font_generator's configuration can also be placed in yaml file.\nAdd _icon_font_ section to either `pubspec.yaml` or `icon_font.yaml` file:\n\n```yaml\nicon_font:\n  input_svg_dir: \"assets/svg/\"\n  output_font_file: \"fonts/my_icons_font.otf\"\n  \n  output_class_file: \"lib/my_icons.dart\"\n  class_name: \"MyIcons\"\n  package: my_font_package\n  format: true\n\n  font_name: \"My Icons\"\n  normalize: true\n  ignore_shapes: true\n\n  recursive: true\n  verbose: false\n```\n\n`input_svg_dir` and `output_font_file` keys are required.\nIt's possible to specify any other config file by using `--config-file` option.\n\n## Using API\n\n[svgToOtf][] and [generateFlutterClass][] functions can be used for generating font and Flutter class.\n\nThe example of API usage is located in [example folder](example/README.md).\n\n[example folder]: https://github.com/ScerIO/icon_font_generator/tree/master/example/example.dart\n[svgToOtf]: https://pub.dev/documentation/icon_font_generator/latest/icon_font_generator/svgToOtf.html\n[generateFlutterClass]: https://pub.dev/documentation/icon_font_generator/latest/icon_font_generator/generateFlutterClass.html\n\n## Notes\n\n- Generated OpenType font is using CFF table.\n- Generated font is using PostScript Table (post) of version 3.0, i.e., it doesn't contain glyph names.\n- Supported SVG elements: path, g, circle, rect, polyline, polygon, line.\n- SVG transforms are applied to paths according to specs.\n- SVG `\u003cg\u003e` element's children are expanded to the root with transformations applied.\nAnything else related to the group is ignored and group referencing is not supported.\n- Consider using [Non-zero fill rule][].\n- When `ignoreShapes` is set to false,\nevery SVG shape's (circle, rect, etc.) outline is converted to path.\nNote that any attributes like \"fill\" or \"stroke\" are ignored and only the outline is used,\nso the resulting glyph may look different from SVG icon.\nIt's recommended to convert every element in SVG to path.\n- When `normalize` is set to false, it's recommended that SVG icons have the same height.\nOtherwise, final result might not look as expected.\n- When Flutter class is generated, static variables names derive from SVG file name\nconverted to pascal case with non-allowed characters removed.\nName is set to 'unnamed', if it's empty.\nSuffix '_{i+1}' is added, if name already exists.\n\n[Non-zero fill rule]: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule\n\n## Contributing\n\nAny suggestions, issues, pull requests are welcomed.\n\n## License\n\n[MIT](https://github.com/ScerIO/icon_font_generator/blob/master/LICENSE)\n\n## Credits\n\nThis software is fork  of unsupported package:\n* [fontify](https://github.com/westracer/fontify)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscerio%2Ficon_font_generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscerio%2Ficon_font_generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscerio%2Ficon_font_generator/lists"}