# Introducing Font Awesome 5 and SVG icons

**URL:** https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643
**Category:** Announcements
**Tags:** new-feature
**Created:** [11월 9, 2018, 12:55오전 UTC](https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643 "2018-11-09T00:55:16Z")
**Posts on this page:** 20
**Page:** 5

<div class="post-metadata">

### Author: ![LeoMcA](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leomca/32/87233_2.png) [@LeoMcA](https://meta.discourse.org/u/LeoMcA)
#### Post date: [2월 12, 2019, 10:41오후 UTC](https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643/82 "2019-02-12T22:41:55Z")

</div>

> [@pmusaraj](#):
>
> **themes or components** :
> 
> add a setting with a name ending in `_icon` and Discourse will automatically add that icon to the subset (provided it’s a valid FA5 icon, of course)

The wording here could be clarified. I originally thought this meant doing this:

```plaintext
globe_icon: true
building_icon: true

```

But what it actually means is doing this:

```plaintext
_icon: "globe|building"

```

Indeed, the setting name needn’t end in `_icon` but just has to include that string somewhere in its name:

[https://github.com/discourse/discourse/blob/master/lib/svg\_sprite/svg\_sprite.rb#L321](https://github.com/discourse/discourse/blob/master/lib/svg_sprite/svg_sprite.rb#L321)

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [2월 14, 2019, 3:12오후 UTC](https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643/83 "2019-02-14T15:12:56Z")

</div>

Thanks, I have updated the OP.

---

<div class="post-metadata">

### Author: ![jrgong](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jrgong](https://meta.discourse.org/u/jrgong)
#### Post date: [3월 7, 2019, 3:23오전 UTC](https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643/84 "2019-03-07T03:23:23Z")

</div>

Are there any plans to add Fontawesome Pro support?

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [3월 7, 2019, 4:04오전 UTC](https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643/85 "2019-03-07T04:04:59Z")

</div>

No, not in core, because Pro needs a per-site license. However, you can easily add it to your own site through a plugin: simply load an svg sprite with Pro icons and register the icons you need to use. The is all documented in the original post.

---

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [3월 22, 2019, 12:30오전 UTC](https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643/86 "2019-03-22T00:30:29Z")

</div>

2 posts were split to a new topic: [Where can I find a list of icons used by Discourse?](https://meta.discourse.org/t/where-can-i-find-a-list-of-icons-used-by-discourse/112296)

---

<div class="post-metadata">

### Author: ![mmayo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mmayo/32/119577_2.png) [@mmayo](https://meta.discourse.org/u/mmayo)
#### Post date: [3월 29, 2019, 4:25오후 UTC](https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643/87 "2019-03-29T16:25:50Z")

</div>

We have a plugin adds a Post Menu Button, and have in the past specified ‘ticket’ as the Icon like this:

```plaintext
{
            className: 'zendesk',
            action: 'createTicket',
            icon: 'ticket-alt',
            title: 'zendesk.create_ticket',
            position: 'first'
}

```

It looks like FA5 uses ‘ticket-alt’ for a similar icon, and Discourse has anticipated this change:

[https://github.com/discourse/discourse/blob/stable/app/assets/javascripts/discourse-common/lib/icon-library.js.es6#L440](https://github.com/discourse/discourse/blob/stable/app/assets/javascripts/discourse-common/lib/icon-library.js.es6#L440)

Whether or not I change the above icon to `ticket-alt` or not, nothing is rendered, and I the following warnings in the web console:

 ![image](https://global.discourse-cdn.com/meta/original/3X/b/1/b1867651129bbefe9811b39f8611d3cfdc49e5f9.png)

(of course the deprecation warning is not shown when using `ticket-alt`.)

Conversely, in our custom footer, we use FAs Social Media Icons, and even when changing to the new ‘brand’/fab syntax they won’t display. If I link to the FA5 css cdn in my theme, they will show up (but the plugin icons do not).

This makes me wonder if there is something I am missing, or. a step I need to use the new Icons. I’ve looked over this thread a number of times and haven’t found an answer. Any suggestions?

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [3월 29, 2019, 4:47오후 UTC](https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643/88 "2019-03-29T16:47:44Z")

</div>

Have you tried adding “ticket-alt” to the `svg icon subset` site setting?

---

<div class="post-metadata">

### Author: ![mmayo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mmayo/32/119577_2.png) [@mmayo](https://meta.discourse.org/u/mmayo)
#### Post date: [3월 29, 2019, 4:53오후 UTC](https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643/89 "2019-03-29T16:53:29Z")

</div>

No, but that did fix my plugin. Thanks!

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [3월 29, 2019, 4:55오후 UTC](https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643/90 "2019-03-29T16:55:06Z")

</div>

Cool. You can also register the icons in your plugin.rb file using:

```plaintext
register_svg_icon "ticket-alt"

```

That’s a cleaner way for plugins to make sure Discourse includes that icon. Same for the brand/regular icons (“fab-brand-icon-name”).

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [4월 11, 2019, 11:17오후 UTC](https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643/91 "2019-04-11T23:17:06Z")

</div>

Hi!  
I’ve updated my theme so it properly displays some icons from Font Awesome 5.

But for some reason, I can’t get to have the Facebook icon displayed.

It is registered in my admin:  
 ![image](https://global.discourse-cdn.com/meta/original/3X/9/4/94f7bcefee8d354faf20702f5825337057304de3.png)

The angle downs are displayed but the facebook icon tag is empty:

 ![image](https://global.discourse-cdn.com/meta/original/3X/3/1/31d3afddad50a288ce26cfa3b659aa99e4f8e80a.png)  
 ![image](https://global.discourse-cdn.com/meta/original/3X/e/5/e5fe3a171068a21348daa2c3d8cd64f529bc8e14.png)  
Website: [https://forum.monocycle.info/](https://forum.monocycle.info/)

Any idea why only the facebook logo doesn’t show up? I tried other icons (baby carriage for example) and those work.

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [4월 11, 2019, 11:32오후 UTC](https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643/92 "2019-04-11T23:32:33Z")

</div>

FA5 has moved brand icons to a separate bundle, this is described in the OP, but essentially, you need to prefix these icons with `fab-`, so try `fab-facebook-f`.

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [4월 11, 2019, 11:54오후 UTC](https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643/93 "2019-04-11T23:54:05Z")

</div>

Thank you very much, it works.

---

<div class="post-metadata">

### Author: ![kkershaw](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kkershaw/32/115025_2.png) [@kkershaw](https://meta.discourse.org/u/kkershaw)
#### Post date: [5월 8, 2019, 4:45오후 UTC](https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643/94 "2019-05-08T16:45:45Z")

</div>

> [@pmusaraj](#):
>
> _In themes_ : add the SVG sprite in your theme’s `/assets` folder, and reference it in `about.json`

I was wondering how to include a custom SVG icon in my theme, in particular to replace the search, hamburger and other icons. Is this only possible if I use a remote theme with an assets folder and about.json file? I’m a bit confused how I could go about this otherwise.

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [5월 8, 2019, 6:27오후 UTC](https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643/95 "2019-05-08T18:27:02Z")

</div>

You can upload the SVG sprite with your custom icons directly via the UI, just make sure the variable name for it is `icons-sprite`. Then the icons in your sprite should be available to use (you can use the JS API to replace the hamburger icon, for example).

---

<div class="post-metadata">

### Author: ![jameshahnii](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jameshahnii/32/108982_2.png) [@jameshahnii](https://meta.discourse.org/u/jameshahnii)
#### Post date: [5월 29, 2019, 11:47오후 UTC](https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643/99 "2019-05-29T23:47:00Z")

</div>

1. Use the [plugin rails generator](https://meta.discourse.org/t/rails-plugin-generator/95907) to create a plugin.
2. Download Font Awesome Pro for web.
3. Unzip the file and add the sprites folder to your local Discourse folder per the “In plugins: simply…” instructions above.
4. Push to Github.
5. Add the plugin to your YML.
6. Rebuild the app.

Boom. You got Font Awesome Pro. I just did it and it miraculously worked on the first try. haha

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [5월 30, 2019, 12:28오전 UTC](https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643/100 "2019-05-30T00:28:44Z")

</div>

> [@jameshahnii](#):
>
> Push to Github.

I’m not a lawyer, but given that Font Awesome Pro is not free, I’d suggest caution pushing the files to GitHub, especially if the repo is public. It may violate the terms of your license.

---

<div class="post-metadata">

### Author: ![jameshahnii](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jameshahnii/32/108982_2.png) [@jameshahnii](https://meta.discourse.org/u/jameshahnii)
#### Post date: [5월 30, 2019, 1:19오후 UTC](https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643/101 "2019-05-30T13:19:10Z")

</div>

Agreed. Make it private.

---

<div class="post-metadata">

### Author: ![TheBestPessimist](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thebestpessimist/32/247704_2.png) [@TheBestPessimist](https://meta.discourse.org/u/TheBestPessimist)
#### Post date: [6월 11, 2019, 4:20오후 UTC](https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643/102 "2019-06-11T16:20:06Z")

</div>

I’d like to use the solved icon as a custom emoji (or just to paste it in a post like this one). The html that discourse uses is the following:

```plaintext
<svg class="fa d-icon d-icon-check-square-o svg-icon svg-string"><use xlink:href="#far-check-square"></use></svg>

```

But how can i embed it into a post?

just pasting it won’t work:  
before icon after icon.

Here’s the raw variant of this post for quick access: [https://meta.discourse.org/raw/101643/102](https://meta.discourse.org/raw/101643/102)

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [6월 11, 2019, 5:02오후 UTC](https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643/103 "2019-06-11T17:02:55Z")

</div>

The icons cannot be used in this way in the composer. If you absolutely must use an icon, you can download the individual SVG file from Font Awesome and then upload it as a regular image (the site must also whitelist uploading of SVGs).

---

<div class="post-metadata">

### Author: ![D8vid](https://avatars.discourse-cdn.com/v4/letter/d/b38774/32.png) [@D8vid](https://meta.discourse.org/u/D8vid)
#### Post date: [6월 11, 2019, 7:47오후 UTC](https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643/104 "2019-06-11T19:47:46Z")

</div>

Here are my quick notes for using FA PNG icons as emoji (in posts, etc.):  
`git clone https://github.com/encharm/Font-Awesome-SVG-PNG`  
Drag & Drop desired 64x64 white (or black) PNG files to new folder, rename each icon with ‘fa-FILENAME.png’  
Drag & Drop renamed icons to `/admin/customize/emojis`

[Previous page](https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643.md?page=4)

[Next page](https://meta.discourse.org/t/introducing-font-awesome-5-and-svg-icons/101643.md?page=6)
