All Projects → Pythonity → Icon Font To Png

Pythonity / Icon Font To Png

Licence: mit
Python script (and library) for exporting icons from icon fonts (e.g. Font Awesome, Octicons) as PNG images

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Icon Font To Png

Glyphsearch
Search for icons from Font Awesome, Glyphicons, IcoMoon, Ionicons, and Octicons
Stars: ✭ 448 (+140.86%)
Mutual labels:  font-awesome, icon-font
Nerd Fonts
Iconic font aggregator, collection, & patcher. 3,600+ icons, 50+ patched fonts: Hack, Source Code Pro, more. Glyph collections: Font Awesome, Material Design Icons, Octicons, & more
Stars: ✭ 31,778 (+16984.95%)
Mutual labels:  font-awesome, icon-font
Iconfontcppheaders
C, C++ headers and C# classes for icon fonts: Font Awesome, Fork Awesome, Material Design, Kenney game icons and Fontaudio
Stars: ✭ 509 (+173.66%)
Mutual labels:  font-awesome, icon-font
Fork Awesome
A fork of the iconic font and CSS toolkit
Stars: ✭ 878 (+372.04%)
Mutual labels:  font-awesome, icon-font
Font Awesome To Png
Exports Font Awesome icons as PNG images
Stars: ✭ 624 (+235.48%)
Mutual labels:  command-line-tool, font-awesome
Vectoriconsroundup
A comparison between popular vectorial icon fonts
Stars: ✭ 126 (-32.26%)
Mutual labels:  font-awesome, icon-font
Receivemidi
Multi-platform command-line tool to monitor and receive MIDI messages
Stars: ✭ 164 (-11.83%)
Mutual labels:  command-line-tool
Projectman
ProjectMan is a command line tool to easily save/open your favorite projects right from command line. `pm add` to add projects and `pm open` to open them from anywhere you want🦸
Stars: ✭ 172 (-7.53%)
Mutual labels:  command-line-tool
Marathon
[DEPRECATED] Marathon makes it easy to write, run and manage your Swift scripts 🏃
Stars: ✭ 1,889 (+915.59%)
Mutual labels:  command-line-tool
Graphtage
A semantic diff utility and library for tree-like files such as JSON, JSON5, XML, HTML, YAML, and CSV.
Stars: ✭ 2,062 (+1008.6%)
Mutual labels:  command-line-tool
Ruby2 Rails4 Bootstrap Heroku
A starter application based on Ruby 2.4, Rails 4.2 and Bootstrap for Sass 3, deployable on Heroku
Stars: ✭ 181 (-2.69%)
Mutual labels:  font-awesome
You Dont Need Gui
Stop relying on GUI; CLI **ROCKS**
Stars: ✭ 4,766 (+2462.37%)
Mutual labels:  command-line-tool
Fast Cli
Test your download and upload speed using fast.com
Stars: ✭ 2,178 (+1070.97%)
Mutual labels:  command-line-tool
Grex
A command-line tool and library for generating regular expressions from user-provided test cases
Stars: ✭ 4,847 (+2505.91%)
Mutual labels:  command-line-tool
Dnote
A simple command line notebook for programmers
Stars: ✭ 2,192 (+1078.49%)
Mutual labels:  command-line-tool
Gister
command line tool to sync github gists
Stars: ✭ 162 (-12.9%)
Mutual labels:  command-line-tool
Autosubsync
Automatically synchronize subtitles with audio using machine learning
Stars: ✭ 179 (-3.76%)
Mutual labels:  command-line-tool
Fontawesome
Easily insert FontAwesome icons into R Markdown docs and Shiny apps
Stars: ✭ 160 (-13.98%)
Mutual labels:  font-awesome
Sketch Iconfont
This plugin helps you easily insert and manage icons from icon fonts.
Stars: ✭ 1,980 (+964.52%)
Mutual labels:  icon-font
Awesome Bootstrap Checkbox
✔️Font Awesome Bootstrap Checkboxes & Radios. Pure css way to make inputs look prettier
Stars: ✭ 2,044 (+998.92%)
Mutual labels:  font-awesome

Icon Font to PNG

Build status Test coverage PyPI version Python versions License

Python script (and library) for easy and simple export of icons from web icon fonts (e.g. Font Awesome, Octicons) as PNG images. The best part is the provided shell script, but you can also use it's functionality directly in your (probably awesome) Python project.

There's also font-awesome-to-png script for backwards compatibility with the first iteration of the concept.

Installation

Make sure you have required packages for Pillow installation.

From PyPI (recommended):

$ pip install icon_font_to_png

With git clone:

$ git clone https://github.com/Pythonity/icon-font-to-png
$ pip install -r icon-font-to-png/requirements.txt
$ cd icon-font-to-png/bin

OS X

As reported here, to install it on OS X:

$ pip install icon_font_to_png --ignore-installed six

Usage

usage: icon-font-to-png [-h] [--list] [--download {font-awesome,octicons}]
                        [--ttf TTF-FILE] [--css CSS-FILE] [--size SIZE]
                        [--scale SCALE] [--color COLOR] [--filename FILENAME]
                        [--keep_prefix]
                        [icons [icons ...]]

Exports font icons as PNG images.

optional arguments:
  -h, --help            show this help message and exit
  --list                list all available icon names and exit
  --download {font-awesome,octicons}
                        download latest icon font and exit

required arguments:
  --ttf TTF-FILE        path to TTF file
  --css CSS-FILE        path to CSS file

exporting icons:
  icons                 names of the icons to export (or 'ALL' for all icons)
  --size SIZE           icon size in pixels (default: 16)
  --scale SCALE         scaling factor between 0 and 1, or 'auto' for
                        automatic scaling (default: auto); be careful, as
                        setting it may lead to icons being cropped
  --color COLOR         color name or hex value (default: black)
  --filename FILENAME   name of the output file (without '.png' extension);
                        it's used as a prefix if multiple icons are exported
  --keep_prefix         do not remove common icon prefix (i.e. 'fa-arrow-
                        right' instead of 'arrow-right')

Examples

Download latest Font Awesome:

$ icon-font-to-png --download font-awesome

List all available icons:

$ icon-font-to-png --css font-awesome.css --ttf fontawesome-webfont.ttf --list

Export 'play' and 'stop' icons, size 64x64:

$ icon-font-to-png --css font-awesome.css --ttf fontawesome-webfont.ttf --size 64 play stop

Export all icons in blue:

$ icon-font-to-png --css font-awesome.css --ttf fontawesome-webfont.ttf --color blue ALL

Export all icons in blue, but using it's hex value:

$ icon-font-to-png --css font-awesome.css --ttf fontawesome-webfont.ttf --color '#0000ff' ALL

Or you can use font-awesome-to-png, without css and ttf arguments:

$ font-awesome-to-png ALL

API

You can use IconFont (and IconFontDownloader for that matter) directly inside your Python project. There's no proper documentation as of now, but the code is commented and should be pretty straightforward to use.

That said - feel free to ask me via email or GitHub issues if anything is unclear.

Tests

Package was tested with the help of py.test and tox on Python 2.7, 3.4, 3.5 and 3.6 (see tox.ini).

Code coverage is available at Coveralls.

To run tests yourself you need to run tox inside the repository:

$ pip install -r requirements/dev.txt
$ tox

Contributions

Package source code is available at GitHub.

Feel free to use, ask, fork, star, report bugs, fix them, suggest enhancements, add functionality and point out any mistakes. Thanks!

Authors

Developed and maintained by Pythonity, a group of Python enthusiasts who love open source, have a neat blog and are available for hire.

Original version by Michał Wojciechowski, refactored by Paweł Adamczak.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].