2

I'm trying to get my icons to work locally on my machine without the use of a server and I'm getting the following for one out of three files giving this kind of error in the console of Firefox only (it works on all of the other browsers).

downloadable font: download failed (font-family: "FontAwesome" style:normal weight:normal stretch:normal src index:1): bad URI or cross-site access not allowed source: file:///C:/Users/jester/Documents/Projects/assets/fonts/fontawesome-webfont.woff2?v=4.7.0

Here is what I have in my index.html file to call the css:

<link rel="stylesheet" href="../assets/css/font-awesome.min.css" type="text/css">

And this is what exists in the css file for the appropriate error from the console:

@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
}

I'm going to state the obvious things I've tried with some of them being ridiculous, but thought I should try every thing I read about this. I tried using double quotes instead of single quotes, removing the query string after the .woff2 file, and even added a semicolon to the end of the font-style. I'm not sure exactly what needs to be done, but almost everyone who had an issue locally was able to add something onto their Apache servers. I don't have that, so what's the problem here?

Jester
  • 141
  • 4
  • 15
  • Do you have a shield-icon in Firefox in the beginning of the URL-bar? – junkfoodjunkie May 19 '17 at 23:03
  • I do not see a shield-icon by the URL. – Jester May 19 '17 at 23:05
  • Ah, I reread - do you HAVE a .woff2 font-file? – junkfoodjunkie May 19 '17 at 23:09
  • Yes, this exists in the fonts folder. I have all the necessary files required for these icons from Font Awesome. – Jester May 19 '17 at 23:11
  • 1
    Possible duplicate of [Downloadable font on firefox: bad URI or cross-site access not allowed](http://stackoverflow.com/questions/15024333/downloadable-font-on-firefox-bad-uri-or-cross-site-access-not-allowed) – junkfoodjunkie May 19 '17 at 23:13
  • I saw that question and the answers and couldn't find exactly what would answer my question. Any more tips or insight on what I'm missing? – Jester May 19 '17 at 23:15
  • 1
    You must have missed [the second answer](http://stackoverflow.com/a/40585811/1891677) to that question, @Jester. – tao May 20 '17 at 00:02
  • On a different note, the only reason you might want this on Firefox, on local, is if you used Firefox for development. If that's not the case, please disregard this comment. I don't have anything against Firefox *per se*, and I do hope they find a way to cope, but considering what Chrome has to offer, you're really choosing against your best interest. At this point, hands down, there's no competition to Chrome when it comes to web development and audit tools. – tao May 20 '17 at 00:09
  • 1
    You're right that I overlooked how the second answer was answering the question. Trust me when I mega face palmed myself. Thanks @AndreiGheorghiu – Jester May 20 '17 at 00:14
  • 1
    You're welcome. Glad I could help. Kind regards. – tao May 20 '17 at 00:19

0 Answers0