I integrated Font Awesome 5 in a project with bootstrap 4. When I recall a font via CSS it does not work. with Font Awesome 4 the code was as follows:
#mainN
If you are using SVG with JavaScript you need to enable this because it's disabled by default. Use
<script data-search-pseudo-elements ... >
inside your script tag.
Requiring 900 weight is not a weirdness but a intentional restriction added by FontAwesome (since they share the same unicode but just different font-weight) so that you are not hacking your way into using the 'solid' and 'light' icons, most of which are available only in the paid 'Pro' version.
I had tried all above the solutions for Font Awesome 5 but it wasn't working for me. :(
Finally, I got a solution!
Just use font-family: "Font Awesome 5 Pro";
in your CSS instead of using font-family: "Font Awesome 5 Free OR Solids OR Brands";
Since FontAwesome 5, you have to enable a new "searchPseudoElements" option to use FontAwesome icons this way:
<script>
window.FontAwesomeConfig = {
searchPseudoElements: true
}
</script>
See also this question: Font awesome 5 on pseudo elements and the new Font Awesome API: https://fontawesome.com/how-to-use/font-awesome-api
Additionaly, change font-family in your CSS code to
font-family: "Font Awesome 5 Regular";