Forum Replies Created
-
AuthorPosts
-
milkyway
MemberHi Victor,
This possibility didn't even occur to me... 😀
I'm using FontAwesome 5.3.1 on this site. Below is the relevant code from my functions.php:
// Make Font Awesome available add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' ); function enqueue_font_awesome() { wp_enqueue_style( 'font-awesome-free', '/fontawesome-free-5.3.1-web/css/all.css' ); }
In the older project, I had been using 4.7.0 (and included it via maxcdn.bootstrapcdn.com).
Do you happen to know what the family name for the Solid FontAwesome fonts is?
My (vague) guess at this point is that I should have included the @fontface part for the fontawesome font, as I did for my other locally hosted fonts. I didn't need this in my older project and the fontawesome icons within the posts etc are loading fine, too, but maybe this is now required to load them as list icons?
I've tried adding the following to my style.css:
/* fontAwesome Solid */ @font-face { font-family: 'FontAwesomeSolid'; font-style: normal; font-weight: 900; src: url('../../../fontawesome-free-5.3.1-web/webfonts/fa-solid-900.eot'); /* IE9 Compat Modes */ src: local('Font Awesome Solid'), local('FontAwesome-Solid'), url('../../../fontawesome-free-5.3.1-web/webfonts/fa-solid-900.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('../../../fontawesome-free-5.3.1-web/webfonts/fa-solid-900.woff2') format('woff2'), /* Super Modern Browsers */ url('../../../fontawesome-free-5.3.1-web/webfonts/fa-solid-900.woff') format('woff'), /* Modern Browsers */ url('../../../fontawesome-free-5.3.1-web/webfonts/fa-solid-900.ttf') format('truetype'), /* Safari, Android, iOS */ url('../../../fontawesome-free-5.3.1-web/webfonts/fa-solid-900.svg#FontAwesomeSolid') format('svg'); /* Legacy iOS */ }
And then changed the font-family call in the style.css to
ul.icon li:before { font-family: 'FontAwesomeSolid'; float: left; width: 1.4em; }
but this hasn't solved the problem.
As you might have guessed, my css skills are mediocre at best - I can understand it when I see it (well, most of the time), but piecing it together myself is a different story.
I really appreciate your help!
Milkyway
-
AuthorPosts