creativetimofficial / ct-paper-dashboard-pro-angular

8 stars 10 forks source link

Failed to decode downloaded font #11

Closed Jcambass closed 6 years ago

Jcambass commented 6 years ago

Hi once I build my angular application and deploying it to nginx it get the error: Failed to decode downloaded font.

register:1 OTS parsing error: invalid version tag

Things I tried:

Any Idea why this happens?

Jcambass commented 6 years ago

I fixed this by removing the ?prefixex in the themify css.

So I changed from:

 src:url('../fonts/themify.eot?-fvbane');
        src:url('../fonts/themify.eot?#iefix-fvbane') format('embedded-opentype'),
                url('../fonts/themify.woff?-fvbane') format('woff'),
                url('../fonts/themify.ttf?-fvbane') format('truetype'),
                url('../fonts/themify.svg?-fvbane#themify') format('svg');
        font-weight: normal;
        font-style: normal;

To:

 src:url('../fonts/themify.eot');
        src:url('../fonts/themify.eot') format('embedded-opentype'),
                url('../fonts/themify.woff') format('woff'),
                url('../fonts/themify.ttf') format('truetype'),
                url('../fonts/themify.svg') format('svg');
        font-weight: normal;
        font-style: normal;

This feels more hacky than anything else. It's a workaround for me and I'd rather apply a recommended solution. Any Inputs on this?

alexandru-paduraru commented 6 years ago

@Jcambass thank you for the information. It's ok without prefixes if that is working fine for you. From what we know what is after "?" is not important as it is not parsed by the browser. It's good only for when you change something in the themify.eot and the old file is cached in the browser for like 90 days. You need to make sure you give another unique thing after "?" so the browser will load again the new files. As long as you don't change anything in the icon files, which I suppose you will not do, then you are perfectly fine with this solution :D

Makes sense?

Jcambass commented 6 years ago

@alexandru-paduraru This makes sense. I'm still a bit worried about the iefix-suffix which is to deal with a bug in Internet Explorer 6 - 8 with fontface. Here is an explanation from the Stack Overflow

http://stackoverflow.com/questions/14207425/css-font-face-iefix

alexandru-paduraru commented 6 years ago

@Jcambass I understand. Unfortunately, that is something that we cannot control but I don't think that should be a thing you to worry about, as IE 6-8 is not supported anymore by Windows, so probably there are under 0.00005% of people on the planet using it. On the official stats, IE11 and Edge have 7.8% of global usage https://www.w3counter.com/globalstats.php, I think IE6-10 are dead. :D