0

Basically what happens is, that Firefox doesn't load my typefaces when my index.html is not in the root folder.

If I put the same index.html in a sub folder (and relink the href's), everything loads fine but the typefaces. If I upload them to my server, everything works fine. So the problem is just locally.

It's really weird.

This is what I use for my font-face rule:

@font-face {
    font-family: pt_sans_condensed;
    src: url(../fonts/PTN57F.ttf);
}

(I only have this in firefox)

  • How are you running this code? file://? http://? What the console says? – enapupe Feb 05 '16 at 00:22
  • Do you have a server installed locally? I mean, can you try loading the document using h​t​t​​p​​​:/​/localhost/... ? – Mr Lister Feb 05 '16 at 10:16
  • Ah yes, that's it. And this has been askled before: [CSS @font-face not working with Firefox, but working with Chrome and IE](http://stackoverflow.com/questions/2856502/css-font-face-not-working-with-firefox-but-working-with-chrome-and-ie) – Mr Lister Feb 05 '16 at 10:30
  • @MrLister that solved it! Thank you so much! I have no clue why they've done things this way, but it works. Cheers! (I did search for it, but couldn't find anything) – user3509354 Feb 05 '16 at 10:39

1 Answers1

0

Mr Lister solved my issue.

Type in firefox's search bar: about:config And look for: security.fileuri.strict_origin_policy

Set it to false, and Firefox will load fonts across different paths!