CSS Font-face does not work

advertisements

I'm trying to import a CSS font but unfortunately it's not working and I'm really unsure why.

The font in the filesystem called 'deadjim.ttf' It is placed inside my main public_html and yes it is the correct path, visiting the path downloads the file.

@font-face {
    font-family: 'deadjim';
    src: url('http://url.com/deadjim.ttf'); /*URL to font*/
}

I've tried clearing my cache but this hasn't worked either. Apparently it's working on Safari but I have no means of checking having a windows PC


Make sure that you're calling the font like normal; @font-face doesn't apply any styles to the html, it just defines the font.

#Define your font
@font-face {
  font-family: 'deadjim';
  src: url('http://url.com/deadjim.ttf'); /*URL to font*/
}

#Will apply the font as default on the entire page
html, body{
  font-family: 'deadjim';
}