Search code examples
htmlcssfontssasstruetype

403 Forbidden - Fonts on XXAMP


Just tried to use a new font, put it in a folder and linked to it, but I am getting this:

GET http://localhost/mywebsite/fonts/garamond/EBGaramond12-Regular.ttf 403 (Forbidden)

I implemented it like so:

@font-face {
  font-family: Garamond;
  src: url(../fonts/garamond/EBGaramond12-Regular.ttf);
  text-rendering: optimizeLegibility;
}

The path is correct, but I'm not sure why I get a 403. I am using XXAMP on OSX, other fonts work fine.


Solution

  • GET http://localhost/mywebsite/fonts/garamond/EBGaramond12-Regular.ttf 403 (Forbidden)

    Is a sign for a file permission problem. You can get the file permissions by ls -l in the terminal. Changing them by chmod to 777 should work. Later on you can change them back to a lower permission for security.