anorudes / redux-easy-boilerplate

React redux easy boilerplate
MIT License
632 stars 122 forks source link

Issue with font imports #51

Closed dmt0 closed 8 years ago

dmt0 commented 8 years ago

I'm importing fonts like so in my style.scss (which in turn is added to .bootstraprc as bootstrapCustomizations

@font-face {
  font-family: 'ralewaylight';
  src: url('assets/fonts/raleway-light-webfont.eot');
  src: url('assets/fonts/raleway-light-webfont.eot?#iefix') format('embedded-opentype'),
       url('assets/fonts/raleway-light-webfont.woff2') format('woff2'),
       url('assets/fonts/raleway-light-webfont.woff') format('woff'),
       url('assets/fonts/raleway-light-webfont.ttf') format('truetype'),
       url('assets/fonts/raleway-light-webfont.svg#ralewaylight') format('svg');
  font-weight: normal;
  font-style: normal;
}

I'm getting the following errors:

Failed to decode downloaded font: http://localhost:3000/dist/dist/db812d8a70a4e88e888744c1c9a27e89.woff2
(index):1 OTS parsing error: invalid version tag

I get errors for each woff, woff2 and ttf file.

dmt0 commented 8 years ago

Fixed that by switching to absolute path in the font url, e.g.:

'/assets/fonts/raleway-light-webfont.eot'