1.问题:maven项目使用Bootstrap时,出现 "Failed to decode downloaded font"和"OTS parsing error: Failed to convert WOFF 2.0 font to SFNT"导致图标出不来的问题。

2.原因:

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

3.解决方案:

设置filter,font文件不需要filter,见下面示例:

<build>2         <finalName>bootstrap in maven</finalName>3         <resources>4             <resource>5                 <directory>src/main/resources</directory>6                 <filtering>true</filtering>7                 <excludes>  8                     <exclude>static/fonts/**</exclude>  9                 </excludes>
10             </resource>
11             <!-- fonts file cannot use filter as the data structure of byte file will be changed via filter -->
12             <resource>
13                 <directory>src/main/resources</directory>
14                 <filtering>false</filtering>
15                 <includes>
16                     <include>static/fonts/**</include>
17                 </includes>
18             </resource>
19             <resource>
20                 <directory>src/main/java</directory>
21                 <includes>
22                     <include>**/*.xml</include>
23                 </includes>
24             </resource>
25         </resources>
26 ...
27 </build>

Failed to decode downloaded font(线上环境字体图标不显示)相关推荐

  1. springboot : Failed to decode downloaded font 和 OTS parsing error

    大家好,我是烤鸭: 采坑实录,看了很多人跟我有类似问题,但是都没解决我的问题: Failed to decode downloaded font 和 OTS parsing error: 尝试了把wo ...

  2. Failed to decode downloaded font

    小Z上周五晚上和同事加班,同事反映了这样一个BUG. 网页上有一段文本需要采用方正超粗黑简体的字体,资源文件为"方正超粗黑简体.TTF",为美工提供.同事反映网站浏览器提示&quo ...

  3. Spring Boot + Bootstrap 出现Failed to decode downloaded font和OTS parsing error: Failed to convert W

    转载自:https://www.cnblogs.com/tomcatandjerry/p/5799188.html 准确来讲,应该是maven项目使用Bootstrap时,出现 "Faile ...

  4. Springboot项目引入Bootstrap后,图标不能正常显示,报:Failed to decode downloaded font

    springboot项目引入bootstrap后,报:Failed to decode downloaded font,图标不能正常显示 在pom文件中,添加如下配置 <plugin>&l ...

  5. Failed to decode downloaded font: URL 问题的两种可能性

    问题:18Failed to decode downloaded font: <URL> 1.先找了百度,都是这样的 比如这个:https://blog.csdn.net/wochunya ...

  6. Spring Boot - Font Awesome OTS parsing error: Failed to convert( Failed to decode downloaded font)

    解决方法: 14 down vote accepted The issue is that Maven was filtering the font files and corrupting them ...

  7. Failed to decode downloaded font:解决方法

    我用的是SpringBoot+layUi写的出现 方法一 发现乱码网上说写拦截器什么的, 下载链接把文件中fonts文件下的替换成我的 链接:https://pan.baidu.com/s/1u3aG ...

  8. node开发环境(mac)和线上环境(linux)搭建

    以前一直在做php后台,对node没有认真研究,现在前端发展速度这么快,再加上node的飞速发展,javascript统一中原指日可待啊.em~~,废话不多说开始开发环境和线上环境搭建吧,写一下自己的 ...

  9. 线上环境HBASE-1.2.0出现oldWALs无法自动回收情况;

    正常情况下,hmaster会定期清理oldWALs文件夹,一般该文件大小也就几百兆,但是我们线上 环境出现了该文件没有自动回收情况,如图: 该目录占用hdfs空间多达7.6T,浪费空间: 后来经过多番 ...

最新文章

  1. 清华校友打造Python调试神器
  2. Android架构组件LiveData+ViewModel
  3. 怎么设置ppt页面的长度和宽度_在PPT中将照片变裸眼3D效果怎样操作?分享技巧,帮你快速实现...
  4. Tengine的Linux下安装和启动
  5. push和unshift方法
  6. JavaScript知识概要
  7. Bootstrap3 弹出提示插件的方法
  8. docker获取数据库时间相差8小时_Docker部署服务时间相差8小时解决方法
  9. 181103每日一句
  10. 疯狂Java讲义P179单例
  11. 用FCM函数实现模糊C均值聚类算法
  12. 如何用计算机tan角度换算,tan角度换算(tan值求角度计算器)
  13. ACE_TAO 017 ACE_wrappers\examples\Reactor
  14. 第一次修U盘,没想到...
  15. OEL / RedHat linux 配置无线网络连接(含驱动安装)
  16. 记2015沈阳区域赛
  17. 在计算机上怎么搜共享打印机,如何共享电脑中的打印机?共享电脑打印机步骤...
  18. Linux读取串口数据
  19. 代码优化就一个原则-消除冗余
  20. Linux中修改系统启动项grub

热门文章

  1. 【CSDN下载】第三期:多AGV调度系统软件、基于PCA的人脸识别系统
  2. C语言宿舍管理查询软件
  3. spring mvc校验部分属性,springmvc校验属性,java.lang.ClassNotFoundException: com.fasterxml.classmate.Filter
  4. 网站|数据分析、大数据、数据挖掘或者数据分析学习相关的网站
  5. thinkphp开发的erp系统旗舰版,模块齐全,功能强大
  6. 华为畅享6怎么找回计算机,华为荣耀畅玩6双清解屏幕锁格机恢复出厂设置方法...
  7. Atom编辑器中使用Hydrogen切换Python虚拟环境
  8. 聋校计算机教材教法培训Ppt,小学数学教材教法培训.ppt
  9. 武装服务器(一):云服务器配置aliyundriver-webdav以及使用Aria2和Rclone挂载阿里云盘实现离线下载器
  10. 如何听节拍器_教你如何使用节拍器