FontAwesome - Failed to decode downloaded font

Similar to the maven-war-plugin usage, if you are using maven-resources-plugin you need to specify that font files extensions shouldn't be filtered :


Got the solution from this SO answer.

I had the same problem, and finally managed to solve it. It may help someone.

I have quite a large .htacces file, with a lot of RewriteCond's and RewriteRule's, and also used the following line to filter some folders from those conditions:

RewriteRule  ^(css|functions|js|media|tpl|vendor)($|/) - [L]

Upon adding the fonts folder (simply called fonts, and located in public_html/), the problem was solved.

RewriteRule  ^(css|fonts|functions|js|media|tpl|vendor)($|/) - [L]

Note that this line should be fairly at the top of your .htaccess file to work.

I'm just answering this for later viewers. If you are working with a maven-war-plugin make sure you exclude the .woff and .ttf files in the filtering or maven will make the files corrupt.

                <targetPath />

The problem isn't with your HTML or CSS code... It must be with the font files or the server,

because normal font files should contain codes and can be downloaded when opened in browser like this :

While your files looks empty without any code even when downloaded:

Try to replace the files ...