CLI gem for comfortably working with icon fonts from http://fontello.com for usage in Rails apps.
Main features:
- Open up your current fontello font in the browser from the command line
- Copy & convert files from the zip into rails app (inclusively Sass enhancements)
Add the gem to your Gemfile gem 'fontello_rails_converter'
and run bundle install
-
Download your initial
.zip
file from http://fontello.com and save it tomyapp/tmp/fontello.zip
-
Run
fontello convert --no-download
inside your app's root directory
It will copy all the assets from the fontello.zip
file into the appropiate places in your app's vendor/assets/
directory.
To use your font in your app you will need to @import
the main stylesheet vendor/assets/stylesheets/fontname.css.scss
in your application.css.sass
using @import 'fontname'
.
You can check if the icon font is working correctly by visiting http://localhost:3000/fontello-demo.html.
When you want to add new icons to your existing fontello font you can open it in the browser by using fontello open
and select all the additional icons you want to add.
Next you click the 'Save session' button on the fontello website. After that you can download, copy and convert the changed font by running fontello convert
(it has persisted the session id in tmp/fontello_session_id
and will used that to pull down your changed font).
Alternatively, you can download & save the .zip
file just like in the initial setp and run fontello convert --no-download
to use the manually downloaded file instead of pulling it down from fontello.
For more help run fontello --help
Besides the main stylesheet (fontname.css.scss
) fontello also provides a couple of additional stylesheets that you might want to @import
in your app for special use cases: fontname-ie7-codes.css.scss
, fontname-embedded.css.scss
, animation.css.scss
, fontname-ie7.css.scss
, fontname-codes.css.scss