解决 Failed to decode downloaded font

Posted 醇氧

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决 Failed to decode downloaded font相关的知识,希望对你有一定的参考价值。

使用Springboot+ bootstrap 开发做项目,在写页面时候出现按钮不展示,查看页面出现下面的我问题:



因为经过maven的filter,会破坏font文件的二进制文件格式,到时前台解析出错。

解决方案:

 <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <excludes>
                    <exclude>**/*.woff</exclude>
                    <exclude>**/*.woff2</exclude>
                    <exclude>**/*.ttf</exclude>
                 </excludes>
            </resource>
            <resource>
            <directory>src/main/resources</directory>
                <filtering>false</filtering>
                <includes>
                    <include>**/*.woff</include>
                    <include>**/*.woff2</include>
                    <include>**/*.ttf</include>
                </includes>
            </resource>
 </resources>

以上是关于解决 Failed to decode downloaded font的主要内容,如果未能解决你的问题,请参考以下文章

解决 spring boot Failed to decode downloaded font

解决composer版本升级报错问题Failed to decode response: zlib_decode(): data error

layui图标不显示 提示Failed to decode downloaded font解决办法

Failed to decode response: zlib_decode(): data error Retrying with degraded;

Element UI + Java Web—— Failed to decode downloaded font:xxx.woff

Element UI + Java Web—— Failed to decode downloaded font:xxx.woff