In our development of the ASP.NET-MVC project, sometimes the font loading failed, but a check the font file directory, found that the file directory is existing and valid, this is why? The original need to add a little bit of configuration code in the Web. config file is done.
The configuration is as follows:
<system.webServer> <staticContent> <remove fileextension= " . Woff "/> <mimemap fileextension=". Woff "mimetype=" Application/x-font-woff "/> <remove fileExtension = ". Woff2"/> <mimemap fileextension= ". Woff2" mimetype= "application/x-font-woff2"/> <remove fileExte Nsion= ". Ttf"/> <mimemap fileextension= ". Ttf" mimetype= "Application/x-font-truetype"/> <remove file Extension= ". svg"/> <mimemap fileextension= ". svg" mimetype= "Image/svg+xml"/> <remove fileExtension= ". OTf"/> <mimemap fileextension= ". OTf" mimetype= "Application/x-font-opentype"/> <remove fileExtens Ion= ". EoT"/> <mimemap fileextension= ". EoT" mimetype= "Application/vnd.ms-fontobject"/> <remove file Extension= ". mp4"/> <mimemap fileextension= ". mp4" mimetype= "Video/mp4"/> </staticContent> </sy Stem.webserver>
MVC program Font Load failure issue