I'm facing this font decoding issue after I deploy ember cli app to heroku. It works fine in my localhost. I'm using @font-face rule for custom font and ember addon for material-icons(ember-material-icons). Any helps would be appreciated. Thanks in advance.
Asked
Active
Viewed 108 times
0
-
OTS is being pretty clear here: that font is not actually a legal font because its encoded `version` field is wrong. So redownload the font from the official source, and use that (also [don't use ttf or otf](https://stackoverflow.com/questions/36105194/are-eot-ttf-and-svg-still-necessary-in-the-font-face-declaration/36110385#36110385)). – Mike 'Pomax' Kamermans Feb 27 '19 at 17:46
-
But whats wrong with material icon fonts? that also not loading. – Vivekraj K R Feb 27 '19 at 17:57
-
what do you mean "what's wrong"? It literally tells you: OTS (the opentype sanitizer) checked the file you thought was a font, and the bytes that cover the `version` tag that all opentype fonts have, is not set to a legal value, so it can't be loaded as a font. Maybe your download got corrupted, maybe your OS "fixed" the byte ordering and so broke the font: get a new copy of that font and things should work. And ideally, get the font _on the server_ (curl or npm install via ssh for instance) instead of copying it over, to prevent byte reordering during copy. – Mike 'Pomax' Kamermans Feb 27 '19 at 18:17
-
I think the issues probably has to do with the double `assets/assets/` URL. Try copying that full font URL into your browser. I would guess you will not download the font itself. Instead you will see your ember app or a 404 page. This could also be an issue of heroku blocking the route or your deployment process not including the file. Could you add your font-face rule to the question as well? – jrjohnson Feb 27 '19 at 22:49