59
votes

I'm developing a Rails app and we need to send emails.

I have installed font-awesome icons through a rails gem (https://github.com/bokmann/font-awesome-rails) (i use .scss)

It works fine on my webpage views but not on emails. At least gmail doesn't display them.

It is normal ? Can I use awesome fonts on email views/layout? If not, where could I find png/svg versions of awesome fonts icons so that the icons I use on my web pages are the same as those I use on my emails (for consistency)?

5

5 Answers

58
votes

You can't use webfonts reliably in html emails. Some clients might respect and render them, but the majority don't.

43
votes

You can use this website to convert the icons into images, and then simply download the images and upload them to Imgur. From there you can use <img> tags to link to the Imgur images.

Edit:

A better solution would be to host the images on your own server with the same domain as your email's domain. This will increase the chance of images automatically being displayed on your emails, as they are normally hidden until the user decides to view them.

For example, if I used [email protected] to send emails, I'd host the images on mydomain.com

8
votes

You can embed them as images in your email. You can use fa2png.io which converts the font awesome icons to png of required size as well as color.

4
votes

You can embed them as images in your email. In order to convert them to images you can download Font Awesome to PNG in the Mac App Store. It will export PNG versions of the font awesome icons in any size or color.

https://itunes.apple.com/us/app/font-awesome-to-png/id826676932?ls=1&mt=12

4
votes

You can try to output the icons into a PNG, and include in your email HTML. If you are familiar with PHP, this open source project at GitHub can help you automatically convert them.