Reputation: 6936
I am trying to use Font Awesome in my project. I modified the font-awesome.css to point to my directory where the font files are stored. So now it looks like this:
src: url('fontawesome-webfont.eot?v=3.2.1');
src: url('fontawesome-webfont.eot?#iefix&v=3.2.1') format('embedded-opentype'), url('fontawesome-webfont.woff?v=3.2.1') format('woff'), url('fontawesome-webfont.ttf?v=3.2.1') format('truetype'), url('fontawesome-webfont.svg#fontawesomeregular?v=3.2.1') format('svg');
But the problem is that it throws error on my browser console for the statement url('fontawesome-webfont.woff?v=3.2.1')
. The error is:
GET http://localhost/***/***/fontawesome-webfont.woff?v=3.2.1 400 (Bad Request) fontawesome-webfont.woff?v=3.2.1:1
GET http://localhost/***/***/fontawesome-webfont.ttf?v=3.2.1 400 (Bad Request) fontawesome-webfont.ttf?v=3.2.1:1
If I modify the statement to url('fontawesome-webfont.woff')
then it works without any error. I found this question on StackOverflow where user has same problem but no satisfactory answers are provided.
Anyone knows the reason for this? Also why are the additional parameters in font's URL provided for like fontawesome-webfont.eot?#iefix&v=3.2.1
and fontawesome-webfont.svg#fontawesomeregular?v=3.2.1
?
Upvotes: 5
Views: 15787
Reputation: 1
Just add the following MIME types :) woff font/woff woff2 font/woff2
Upvotes: 0
Reputation: 2396
The reason of this issues is wrong path of fonts or missing required fonts.To fix the issue follow steps bellow
1: go to http://fontawesome.io/
2: download fonts, and extract downloaded zip file
3: go to fonts folder, copy fonts
4: past fonts to http://localhost/***/***/
hope it will be help full for you.
Upvotes: -3
Reputation: 132
I had nearly the same problem: the only fontawesome-webfont.woff?=3.2.1
gives the error but another woff without version is loading with no problem and ttf with 3.2.1 was loaded with no problem.
I have added MIME
type woff as font/woff
to the application's MIME
types.
Getting 200 now.
Regards
Upvotes: 7