Set of scripts to easily build webfonts from SVG images
npm install
- Download or clone the Font Awesome distribution.
- Place the new Font Awesome's
fonts/fontawesome-webfont.svg
insrc/original
. - Run
make dump
to create the corresponding SVG glyph files insrc/svg
. - Any new glyph requiring an entry in
config.yml
will be found in a temporarydiff.yml
file; check Font Awesome'sless/variables.less
to find the name of the glyph matching the correspondingcode:
indiff.yml
, then copy the updated entry toconfig.yml
. Tip: usecat diff.yml | grep code | cut -c 14-17 | while read CODE; do grep $CODE path/to/Font-Awesome/less/variables.less; done
to match the glyphs indiff.yml
with the corresponding Font Awesome names inFont-Awesome/less/variables.less
. - Once
config.yml
has been updated with all new glyphs, runmake dump
again to make sure all temporary files (saysrc/svg/glyph__f22d.svg
) are being replaced with properly named glyphs (saysrc/svg/genderless.svg
). - Run
make
. Generated data will be placed in./font
. You can rebuild css/html only by runningmake html
. - Commit your changes, say,
git commit config.yml src/original -m "Font Awesome vX.Y.Z"
, and create a Pull Request.
Any image will be proportionally scaled, to fit height in ascent-descent It's convenient to make height = 1000px. Default font baseline will be 20% from the bottom.
In most cases it's ok to visually align icons to middle line, not to baseline. If you are not sure, how to start - make image with 10% top/bottom padding. Then generate demo page and tune scale/offset.