SC5 / sc5-styleguide

Styleguide generator is a handy little tool that helps you generate good looking styleguides from stylesheets using KSS notation
http://styleguide.sc5.io/
MIT License
1.26k stars 168 forks source link

Failed to decode downloaded font #968

Open shanecarmody opened 8 years ago

shanecarmody commented 8 years ago

Hey,

I’m getting the following warnings in the console after I generate my styleguide. Does anybody know how I can fix them? I’m not sure what the second warning is related to.

Failed to decode downloaded font: http://localhost:3000/assets/fonts/fontawesome-webfont.eot? OTS parsing error: invalid version tag

capture d ecran 2016-06-03 a 15 19 13
PhilippeVay commented 8 years ago

Hi,

The real problem may be that there is no fontawesome-webfont.sth font file at {{yourAppRootInDev}}/styleguide/assets/fonts/. At least, my colleague encountered the exact same error message after adding another font icon.

You'd expect a 404 but err, no: as the internal server is catching URLs / routing / resolving paths, it'll always answer via index.html. In DevTools / Network tab, you should be able to see that the server sent your browser an HTML file and more precisely index.html from SC5, not a font.

Browse files on your disk where SC5 is being generated (demo-output/ in demo) down to assets/fonts/: if font files are lacking, then you should fix the gulp task that copy them.

Hope this helps,

shanecarmody commented 8 years ago

I get the same error when I run the demo:

capture d ecran 2016-07-08 a 16 25 56

All the font files are there so I don’t know what is causing the issue.

capture d ecran 2016-07-08 a 16 27 59
Elena5585 commented 2 months ago

@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 500; src: url(Roboto-normal-500.woff) format('woff'); unicode-range: U+0-10FFFF; }

Я добавила вот эту строку в fonts.css : unicode-range: U+0-10FFFF; и все шрифты подключились