# Font-Awesome 4-Icons im Theme verwenden, aber FA5 beibehalten?

**URL:** <https://meta.discourse.org/t/use-font-awesome-4-icons-in-theme-but-keep-fa5/118776>\
**Category:** Development\
**Created:** [27. Mai 2019 um 09:30 UTC](https://meta.discourse.org/t/use-font-awesome-4-icons-in-theme-but-keep-fa5/118776 "2019-05-27T09:30:16Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![Chaboi\_3000](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chaboi_3000/32/163015_2.png) [@Chaboi\_3000](https://meta.discourse.org/u/Chaboi_3000)\
**Post date:** [18. Juni 2019 um 08:00 UTC](https://meta.discourse.org/t/use-font-awesome-4-icons-in-theme-but-keep-fa5/118776/18 "2019-06-18T08:00:40Z")

</div>

> [@pmusaraj](#):
>
> rom core, and replace the symbol tags in it with yours, and see if that works.

I copied the same exact thing and GitHub declined it. So I tried a different technique using local CDN:  
[https://github.com/FortAwesome/Font-Awesome/wiki/Customize-Font-Awesome#with-localcdn-fontawesomealljs](https://github.com/FortAwesome/Font-Awesome/wiki/Customize-Font-Awesome#with-localcdn-fontawesomealljs)  
But it seems like there’s an error with the FA library. Here’s my broken code:

```plaintext
<script type="text/discourse-plugin" version="0.8">
    // replace 1568, 1568 with your SVG viewbox
// e001 is the unicode point which represents this custom icon. Increment this value for other icons
// replace 'M256...' with your single-path SVG
var faListOldStyle = {
  prefix: 'fas',
  iconName: 'oldm',
  icon: [1792, 1792, [], 'e001', 'M1344 960v-640h-448v1137q119-63 213-137 235-184 235-360zm192-768v768q0 86-33.5 170.5t-83 150-118 127.5-126.5 103-121 77.5-89.5 49.5-42.5 20q-12 6-26 6t-26-6q-16-7-42.5-20t-89.5-49.5-121-77.5-126.5-103-118-127.5-83-150-33.5-170.5v-768q0-26 19-45t45-19h1152q26 0 45 19t19 45z']
}
FontAwesome.library.add(
  faListOldStyle
)
</script>
<script type="text/discourse-plugin" version="0.8">
    api.replaceIcon('shield-alt', 'fas-olm');
</script>

```

This seems to be broken:

```plaintext
FontAwesome.library.add(
  faListOldStyle
)

```

Returning the following error:

```plaintext
2742f8c……020da268e4465.js:11 Uncaught ReferenceError: FontAwesome is not defined
    at 2742f8c……020da268e4465.js:11
(anonymous)	@	2742f8c……020da268e4465.js:11

```

Edit: I looked over your post here, and it worked! Thank you so much for guiding me on this tiny thing! 🙂  
 ![53%20PM](https://global.discourse-cdn.com/meta/original/3X/3/9/39f972be6507f721a92e577e47a9d16fe5451385.png)

> [@pmusaraj](#):
>
> o declare the XML encoding at the top of the file. Copy the contents of [https://raw.githubusercontent.com/discourse/discourse/master/vendor/assets/svg-icons/discourse-additional.svg](https://raw.githubusercontent.com/discourse/discourse/master/vendor/assets/svg-icons/discourse-additional.svg) from core, and replace the symbol tags in it with yours, and see if that works.

---

_[View the full topic](https://meta.discourse.org/t/use-font-awesome-4-icons-in-theme-but-keep-fa5/118776)._
