How to Solve Springboot OTS parsing error: Failed to convert WOFF 2.0 font to SFNT

After the font and other files are added to the springboot project, the page cannot be recognized, and the browser debugging window reports the following error:

Failed to decode downloaded font: http://localhost:8080/fonts/fontawesome-webfont.woff?v=4.4.0
OTS parsing error: incorrect file size in WOFF header

Failed to decode downloaded font: http://localhost:8080/fonts/fontawesome-webfont.ttf?v=4.4.0
OTS parsing error: incorrect entrySelector for table directory

The solution is to add the following contents to the POM file without filtering the font file


Finally, don’t forget to restart the project!! Clear browser cache

Similar Posts: