Failed to decode downloaded font

碰到如下错误,该错误是开启layui的打印、导出、筛选列时出现的,不能正常显示图标及文字

Failed to decode downloaded font_第1张图片

 

原因:

@参考文章

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

解决办法:

去除对.tff和.woff的拦截即可

springmvc.xml:

    <mvc:interceptors>
        <mvc:interceptor>
            <mvc:mapping path="/**" />
            <mvc:exclude-mapping path="/**/fonts/*" />
            <mvc:exclude-mapping path="/**/*.css" />
            <mvc:exclude-mapping path="/**/*.js" />
            <mvc:exclude-mapping path="/**/*.png" />
            <mvc:exclude-mapping path="/**/*.gif" />
            <mvc:exclude-mapping path="/**/*.jpg" />
            <mvc:exclude-mapping path="/**/*.jpeg" />
            
            
        mvc:interceptor>
    mvc:interceptors>

 

转载于:https://www.cnblogs.com/yanan7890/p/10399450.html

你可能感兴趣的:(测试,javascript,java)