https://github.com/lyn-euler/icont-cli
a tool which convert svg(s) to ttf
https://github.com/lyn-euler/icont-cli
cli dart flutter fluttericon icon iconfont iconfonts node svg ttf
Last synced: 3 months ago
JSON representation
a tool which convert svg(s) to ttf
- Host: GitHub
- URL: https://github.com/lyn-euler/icont-cli
- Owner: lyn-euler
- License: mit
- Created: 2020-06-09T10:10:42.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-06T07:47:38.000Z (over 2 years ago)
- Last Synced: 2025-03-13T07:09:54.761Z (4 months ago)
- Topics: cli, dart, flutter, fluttericon, icon, iconfont, iconfonts, node, svg, ttf
- Language: JavaScript
- Homepage:
- Size: 134 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# icont-cli
A tool which convert svg(s) to tff, and output `.dart` file for flutter project
And u can copy result(s) to dist dir.
## Install```shell
npm install -g icont-cli
```## Usage
### convert svg(s) to ttf & dart file
```shell
Usage: icont [options] [command]Convert SVG(s) to ttf file
Options:
-v, --version output the version number
-i, --input input svg dir or file path (default: "svg")
-o, --output output path (default: "output")
-n, --fontname output font name (default: "iconfonts")
-h, --help display help for commandCommands:
copy [options] copy file to target dir.
```### copy files
```shell
Usage: icont copy [options]copy file to target dir.
Options:
-d, --dist dist dir
-s, --src copy form dir
-e, --ext file ext name
-h, --help display help for command
```## Flutter Project Configuration Demo
- pubspec.yaml
```shell
fonts:
- family: iconfonts
fonts:
- asset: iconfonts/iconfonts.ttf
```- script sample
```shell
#!/usr/bin/env bash
if [ ! `command -v icont` ]; then
npm install -g icont-cli
fitemp_dir='.icont'
fonts_dir='fonts'
dart_path='lib'# svg to ttf & dart
icont -i svg -o $temp_dir# copy to target dir
icont copy -s $temp_dir -d $fonts_dir -e .ttf
icont copy -s $temp_dir -d $dart_path -e .dart# delete temp dir
# rm -rf $temp_dir
```