svg_to_font 1.0.2 copy "svg_to_font: ^1.0.2" to clipboard
svg_to_font: ^1.0.2 copied to clipboard

A tool for converting svg files to a font. To facilitate developers to quickly generate icon font (.ttf) and Flutter icon class, We developed the svg_to_font library.

SvgToFont #

GitHub stars Pub Version Pub Likes Pub Points MIT Licence

A tool for converting SVG files to font files.

Table of Contents #

Background #

To facilitate developers to quickly generate icon font (.ttf) and Flutter icon class, We developed the svg_to_font library.

Then you can use icons like the font.

Requirements #

Node.JS V10+ . Install Node

Get Started #

Install #

dart pub global activate svg_to_font

An Example #

  1. Put all of your icon SVG into some folder(example/assets);

  2. Generated camus_icons.dart in example/lib and camus_icons.ttf in example/assets

    svg_to_font generate  --input=./example/assets --font-output=./example/assets/fonts --class-output=./example/lib
    
  3. Add some code to pubspec.yaml

  fonts:
    - family: CamusIcons
      fonts:
        - asset: assets/fonts/camus_icons.ttf

Params #

parameter description default
--help Print this usage information --
--input Input your svg file path --
--font-output Output your fonts dir path --
--class-output Flutter icons Class output dir --
--name Flutter icons class Name CamusIcons
--delete-input Is delete your input svg, if false, can preview svg false

License #

MIT © Camus Design

7
likes
160
pub points
21%
popularity

Publisher

verified publishercamus.design

A tool for converting svg files to a font. To facilitate developers to quickly generate icon font (.ttf) and Flutter icon class, We developed the svg_to_font library.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

args, code_builder, dart_style, io, path, recase

More

Packages that depend on svg_to_font