Skip to content

A command line tool for generating images from icon fonts

License

Notifications You must be signed in to change notification settings

nawatts/font2image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

font2image

A command line tool for generating images from icon fonts

usage: font2image.py [-h] [--background-color BACKGROUND_COLOR]
                     [--fill-color FILL_COLOR] [--font-size FONT_SIZE]
                     [--image-size IMAGE_SIZE] [--output OUTPUT]
                     font_file glyph

Generate an image from a character in a font.

positional arguments:
  font_file             The font file to pull icon from.
  glyph                 The Unicode code of the character to render. Ex: f0f3.

optional arguments:
  -h, --help            show this help message and exit
  --background-color BACKGROUND_COLOR
                        Background color of image as RGB hex string. Defaults to #ffffff.
  --fill-color FILL_COLOR
                        Color of character as RGB hex string. Defaults to #000000.
  --font-size FONT_SIZE
                        Size of character to draw in pixels. Defaults to half
                        of image size.
  --image-size IMAGE_SIZE
                        Dimensions of output image in pixels. Defaults to 128
                        pixels.
  --output OUTPUT       Path to output generated image. The output image's
                        format is determined by the file extension. If output
                        is omitted, a preview will be shown. Note that the
                        preview mechanism may not support an alpha channel.

About

A command line tool for generating images from icon fonts

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages