Enabling support of the FontAwesome to a Drupal 7 website
Using the theme folder file with the extension .info
E.g., sites/all/themes/bootstrap_subtheme
bootstrap_subtheme.info
considering, sites/all/libraries is the path for the fontawesome library:
; FontAwesome 4 CSS
; --------------
stylesheets[all][] = ../../libraries/fontawesome/css/font-awesome.min.css; FontAwesome 5 CSS
; --------------
stylesheets[all][] = ../../libraries/fontawesome_v5/css/brands.min.css
stylesheets[all][] = ../../libraries/fontawesome_v5/css/all.min.css
Be sure to verify, that @font-face property is enabled - signifgicatly reduces load upon a page speed performance
- https://tools.pingdom.com
- https://pagespeed.web.dev/ (former https://developers.google.com/speed/pagespeed/insights)
- https://www.webpagetest.org
- https://gtmetrix.com
@font-face {
font-family: 'FontAwesome';
src: url('../fonts/fontawesome-webfont.eot?v=4.7.0');
src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');
font-weight: normal;
font-style: normal;
}