5

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?

3 Answers 3

7

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

Sign up to request clarification or add additional context in comments.

2 Comments

First src line is to support IE9, but it needs this answers IIS configure fix. Second src line is for IE6-8. See webmasters.stackexchange.com/questions/26992/… and fontspring.com/blog/fixing-ie9-font-face-problems
this worked for me, but just wondering...why does this fix it?
0

Just add the following MIME types :) woff font/woff woff2 font/woff2

Comments

-3

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.