#icons #true-type #font #converting #image

app font2png

A tool for converting TTF icon font to images

1 stable release

1.0.0 May 22, 2021
0.1.0 May 22, 2021

#23 in #icon

MIT license

20KB
83 lines

font2img

Downlods Count

A tool for converting TTF icon font to images.

Install

MacOS

Via homebrew.

brew tap kofj/kofj
brew install font2png

Via Cargo

cargo install font2png

Help

# font2img v1.0.0
Fanjiankong <kfanjian@gmail.com>
A tool for converting TTF icon font to images.

example: 
        font2png --charter $(printf '\ue957') -s 80 -f a -o src/assets/on/user.png -c "#d43c33"

USAGE:
    font2png [FLAGS] [OPTIONS] --charter <charter> --color <color> --font <fontpath> --output <output>

FLAGS:
    -h, --help           Prints help information
    -t, --transparent    transparent background
    -V, --version        Prints version information

OPTIONS:
        --charter <charter>    icon charter
    -c, --color <color>        icon css style color
    -f, --font <fontpath>      font file path
    -o, --output <output>      output filename
    -s, --size <size>          output image's height and width(pixel) [default: 120]

TODO

  • Enble/disable transparent background.
  • Custom background color.
  • Batch convert cmap list.
  • Custom batch convert.

Dependencies

~14MB
~235K SLoC