Recently, I’ve been looking at some information about the web front end, and the following error occurred in processing a CSS, so as to record it.
I compiled a project under webstorm and loaded the index page on it. I got the following warning on the chrome console:
Failed to decode downloaded font: http://localhost:4200/assets/fonts/Simple-Line-Icons.woff2?v=2.4.0
OTS parsing error: Failed to convert WOFF 2.0 font to SFNT
Failed to decode downloaded font: http://localhost:4200/assets/fonts/Simple-Line-Icons.woff2?v=2.4.0
OTS parsing error: Failed to convert WOFF 2.0 font to SFNT
Failed to decode downloaded font: http://localhost:4200/assets/fonts/Simple-Line-Icons.woff2?v=2.4.0
OTS parsing error: Failed to convert WOFF 2.0 font to SFNT
Custom font and code used:
@font-face {
font-family: 'simple-line-icons';
src: url('../fonts/Simple-Line-Icons.eot?v=2.4.0');
src: url('../fonts/Simple-Line-Icons.eot?v=2.4.0#iefix') format('embedded-opentype'),
url('../fonts/Simple-Line-Icons.woff2?v=2.4.0') format('woff2'),
url('../fonts/Simple-Line-Icons.ttf?v=2.4.0') format('truetype'),
url('../fonts/Simple-Line-Icons.woff?v=2.4.0') format('woff'),
url('../fonts/Simple-Line-Icons.svg?v=2.4.0#simple-line-icons') format('svg');
font-weight: normal;
font-style: normal;
}
The styleext I use is SCSS, and the stylesheet file suffix is. CSS.
There are two solutions
1. Will xxxx.css Change to xxxx.css.scss .
2. Change the format in the font declaration. Change format (‘woff ‘) to format (‘font woff’)
@font-face {
font-family: 'simple-line-icons';
src: url('../fonts/Simple-Line-Icons.eot?v=2.4.0');
src: url('../fonts/Simple-Line-Icons.eot?v=2.4.0#iefix') format('embedded-opentype'),
url('../fonts/Simple-Line-Icons.woff2?v=2.4.0') format('font-woff2'),
url('../fonts/Simple-Line-Icons.ttf?v=2.4.0') format('truetype'),
url('../fonts/Simple-Line-Icons.woff?v=2.4.0') format('font-woff'),
url('../fonts/Simple-Line-Icons.svg?v=2.4.0#simple-line-icons') format('svg');
font-weight: normal;
font-style: normal;
}
Read More:
- springboot : Failed to decode downloaded font 和 OTS parsing error
- How to Fix Spring Boot OTS parsing error: Failed to convert WOFF 2.0
- The icon on the layui page is not displayed, and an error message is reported: Failed to decode downloaded font …..
- To change the theme and font of your pychar
- Modification scheme of binary files in dot matrix font library
- Pychar font zoom setting
- appear pygame.error : font not initialized problem, remember to check whether the program calls pygame.init ()
- Failed to decode response: zlib_decode(): data error
- OTS parsing error: invalid version tag
- Python failed to use PIL writer library. TTF, etc. oserror: cannot open resource
- Can’t create PDF file with font Calibri bold error resolution
- Word failed to convert PDF, export failed due to an unexpected error
- Tensorflow ValueError: Failed to convert a NumPy array to a Tensor
- When using CSS to write the registration page, we found that the editing effect is not effective
- Solution to “TCLs parsing failed” when dnf starts
- Element add font packaging error resolution
- VUEJS Failed to execute ‘removeChild’ on ‘Node’: The node to be removed is not a child of
- Message: failed to decode response from marionette
- Failed to convert value of type ‘java.lang.String‘ to required type ‘java.util.Date‘;
- “Failed to convert @ drawable / XX into a drawable exception details are logged in window”