Spring boot-font Awesome OTS parsing error:failed to convert font load failed

Source: Internet
Author: User

Font files, loading not out

Solution One

The problem is that Maven is filtering font files and destroying them.

    <resource>        <directory>${project.basedir}/src/main/resources</directory> <filtering>true</filtering> </resource>

The workaround is to make the following changespom.xml

    <resource>        <directory>${project.basedir}/src/main/resources</directory> <filtering>True</filtering> <excludes> <exclude>static/fonts/**</exclude>  </excludes> </resource>< Span class= "PLN" > <resource> <directory>${project.basedir}/src/main/resources</directory> <filtering>false</filtering> span class= "tag" ><includes> <include>static/ Fonts/**</include> </includes>  </RESOURCE>           

This change allows fonts to not be filtered during packaging.

Solution II

Another way is to update the configuration of the Maven-resources-plugin as follows:

<plugin>     <groupId>Org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactid><configuration> <nonfilteredfileextensions>< Span class= "PLN" > <nonfilteredfileextension>ttf</ Nonfilteredfileextension> <nonfilteredfileextension> woff</nonfilteredfileextension>  <nonfilteredfileextension>woff2</nonfilteredfileextension>< Span class= "PLN" > </nonfilteredfileextensions> </ Configuration></PLUGIN>        

This article refers to Https://stackoverflow.com/questions/34037051/spring-boot-font-awesome-ots-parsing-error-failed-to-convert

Domestic find long time find, finally found in StackOverflow solution

Spring boot-font Awesome OTS parsing error:failed to convert font load failed

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.