1

I am continuing to have an issue wherein locally installed webfonts are not loaded by the @font-face declaration, but external webfonts (Google) are functioning perfectly.

What makes little sense is that the syntax used in my font-face declarations is identical to that of Google's WebFont declarations, yet does not seem to work.

The next step is of course to verify the path for the local font files is correct. Copying and pasting the URL used in the @font-face declaration leads to the font file being downloaded to my computer, ergo the path must be valid.

I have also checked the permissions for the font files. These are all set to 0755, which I believe should be adequate for reading by any browser.

Some background information; this is a web server running Ubuntu 14.04 and nginx for a backend.

CSS

@font-face {
   font-family: 'BebasNeueRegular';
   font-style: normal;
   font-weight: normal;
   src: url(http://gprejects.com/forum/styles/BBOOTS/theme/font/bebasneue/BebasNeue-webfont.eot?#iefix) format('embedded-opentype'), url(http://gprejects.com/forum/styles/BBOOTS/theme/font/bebasneue/BebasNeue-webfont.woff) format('woff'), url(http://gprejects.com/forum/styles/BBOOTS/theme/font/bebasneue/BebasNeue-webfont.ttf) format('truetype'), url(http://gprejects.com/forum/styles/BBOOTS/theme/font/bebasneue/BebasNeue-webfont.svg#BebasNeueRegular) format('svg');
}

h1, h2, h3, h4, h6, h1 a, h2 a, h3 a, h4 a, h6 a {
    color: #333333;
    font-family: 'BebasNeueRegular','Oswald','Arial','Helvetica',sans-serif;
    font-weight: 200;
    line-height: normal;
    margin: 0 0 10px;
    -webkit-font-smoothing: antialiased;
}

Notice that Oswald is a Google WebFont and is working correctly as a fallback, and that everything else in the same CSS file as the @font-face declaration is also working as intended.

Minardista
  • 11
  • 2
  • Can you link to a page where this problem occurs? One thing that strikes me is the font weight that doesn't match. – Mr Lister Sep 25 '16 at 07:28
  • http://gprejects.com/forum/ - Anything in Oswald should be BebasNeueRegular. – Minardista Sep 25 '16 at 15:22
  • Interesting. I see that it goes wrong, but I can't see WHAT goes wrong. Nothing in the console; the computed style of the h1 blocks is OK; etc. If I put your exact `@font-face` declaration in a file of my own, it still works correctly, even if I it is called up from a different domain. I don't know; this problem takes a better man than me. – Mr Lister Sep 27 '16 at 07:01
  • On the plus side, I don't feel like such an idiot any more, so that's something! – Minardista Sep 28 '16 at 11:57

1 Answers1

0

In Chrome inspector, I don't see any calls being made to fetch any BebasNeue font files. Are you sure the font-family definition for BebasNeue is loading on that page

Ringo
  • 5,097
  • 3
  • 31
  • 46