Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to decode downloaded font in Meteor

Tags:

css

fonts

meteor

This is my CSS:

@font-face {
    font-family: 'geometria_lightlight';
    src: url('Geometria-Light-webfont.eot');
    src: url('Geometria-Light-webfont.eot?#iefix') format('embedded-opentype'),
         url('Geometria-Light-webfont.woff2') format('woff2'),
         url('Geometria-Light-webfont.woff') format('woff'),
         url('Geometria-Light-webfont.ttf') format('truetype'),
         url('Geometria-Light-webfont.svg#geometria_lightlight') format('svg');
    font-weight: lighter;
    font-style: normal;

}

#logo{
  font-family: 'geometria_lightlight';
  font-size: 60px;
}

This is the message I am getting in Chrome: Failed to decode downloaded font: http://localhost:3000/Geometria-Light-webfont.woff2 localhost/:1 OTS parsing error: invalid version tag localhost/:1 Failed to decode downloaded font: http://localhost:3000/Geometria-Light-webfont.woff

I get this message with every single font that I download via Font Squirrel.

like image 544
lola_the_coding_girl Avatar asked Sep 24 '15 17:09

lola_the_coding_girl


1 Answers

Stick your fonts in the folder public/fonts.

And then do something like this:

@font-face {
  font-family: 'BebasNeueRegular';
  src: url('/fonts/BebasNeue-Regular.ttf') format('truetype');
}
like image 179
Eliezer Steinbock Avatar answered Sep 28 '22 09:09

Eliezer Steinbock