Generate icon webfonts from the comfort of the command line.
Full documentation
Changelog
Feedback and issues
# Requires FontForge
brew install fontforge eot-utils ttfautohint
gem install fontcustom
fontcustom compile path/to/vectors # Compiles icons into `fontcustom/`
fontcustom watch path/to/vectors # Compiles when vectors are changed/added/removed
fontcustom compile # Uses configuration options from `fontcustom.yml`
fontcustom watch # or `config/fontcustom.yml`
fontcustom help # See all options
To avoid finger-fatigue, create a configuration file with fontcustom config
. Typically, this should live in the directory where you plan on running fontcustom
commands.
# Available Options (defaults shown)
font_name: fontcustom # Names the font (also sets name and directory of generated files)
project_root: (working dir) # Context for all relative paths
input: (project_root) # Where vectors and templates are located
output: (project_root)/(font name) # Where generated files will be saved
no_hash: false # Whether to include an asset-busting hash
css_prefix: icon- # CSS class prefix
preprocessor_path: "" # Font path used in CSS proprocessor templates
data_cache: (same as fontcustom.yml) # Sets location of data file
debug: false # Output raw messages from fontforge
verbose: true # Set to false to silence
templates: [ css, preview ] # Templates to generate alongside fonts
# Possible values: preview, css, scss, scss-rails, bootstrap,
# bootstrap-scss, bootstrap-ie7, bootstrap-ie7-scss
# Advanced input/output
# Set input or output as a hash for more control
input:
vectors: path/to/vectors # required
templates: path/to/templates
output:
fonts: app/assets/fonts # required
css: app/assets/stylesheets
preview: app/views/styleguide
custom-template.yml: custom/path # set paths of custom templates by referencing their file name