Failed to decode downloaded font [How to Solve]

The following error is encountered. This error occurs when the print, export and filter columns of layui are opened. The icon and text cannot be displayed normally

Reason:

@Reference article

Because after Maven’s filter, the binary file format of the font file will be destroyed, and the foreground parsing error will occur

Solution:

Remove the interception of. TFF and. 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:exclude-mapping path="/**/*.ttf" />
            <mvc:exclude-mapping path="/**/*.woff" />
        </mvc:interceptor>
    </mvc:interceptors>

Similar Posts: