using @font-face in Microsoft Edge

前端 未结 4 1219
野性不改
野性不改 2021-01-05 09:31

I am dealing with a strange issue here.. It seems that Microsoft Edge browser doesn\'t load fonts when I use @font-face. I checked all my computers that run Windows 10 &

4条回答
  •  孤城傲影
    2021-01-05 10:19

    Things have changed for Microsoft Edge regarding .woff fonts. I recently purchased a Windows 10 laptop. The websites that had .woff fonts in @font-face did not display them in Microsoft Edge but did display them in Internet Explorer. The Microsoft developer website as of 5/11/2016 says that .woff2 is supported in Edge as follows.

    Microsoft Edge supports the Web Open Font Format (WOFF) File Format 2.0 specification which provides an improved compression algorithm from WOFF 1.0. The font format "woff2" is supported.

    Here is an example of the CSS code I implemented in all of my websites to successfully display my special fonts using Microsoft Edge based on the link above.

    @font-face {
      font-family: Eurostile;
      src: url("http://mylink/eurostile.woff"), url("http://mylink/eurostile.woff2"), url("http://mylink/eurostile.eot"), url("http://mylink/eurostile.ttf") format('truetype');
    }
    

提交回复
热议问题