user4583569
user4583569

Reputation: 109

problems using custom fonts

I have been trying to use the custom font 'anders' in my CSS, but don't understand why it won't work.

Here is my code:

@font-face { font-family: 'andersregular'; `src: url('Anders-webfont.eot'); } h1 { ``font-family:'andersregular'; }

I'd appreciate any help.

Upvotes: 0

Views: 217

Answers (1)

lycorine
lycorine

Reputation: 308

EOT font file format is only used by IE. Are you using a different browser? You'll need to include more formats to support other browsers.

You'll want to convert the font into the other necessary formats using a service like Font Squirrel Web Font Generator

And include the other formats in this way:

@font-face {
  font-family: 'andersregular';
  src: url('Anders-webfont.eot'); /* IE9 Compat Modes */
  src: url('Anders-webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
       url('Anders-webfont.woff2') format('woff2'), /* Super Modern Browsers */
       url('Anders-webfont.woff') format('woff'), /* Pretty Modern Browsers */
       url('Anders-webfont.ttf')  format('truetype'), /* Safari, Android, iOS */
       url('Anders-webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
}

Upvotes: 0

Related Questions