Lato 字体无法在 IE 中呈现,但在 Chrome 中工作正常

Lato Font not rendering in IE but its working fine in Chrome

我正在为我的 UI 开发视角使用 Google Lato 字体,但是我在使用 lato 字体时遇到了问题,它在 IE 中无法正确呈现,但在 [=44] 中工作正常=] 浏览器,我不明白发生了什么事?


我只是将 Google 字体下载到本地

Lato Google 字体

<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700&amp;subset=latin-ext" rel="stylesheet">

我的本地路径

在CSS

中指定
body {    font-family: 'Lato', sans-serif;} 

Chrome - 它的拍摄 'Lato'

IE - Lato 字体未呈现,它将采用 sans-serif

而不是 lato 字体

我不知道我错过了什么,在那种情况下你能帮我吗?

我通过

使用了google字体lato
<link href="https://fonts.googleapis.com/css?family=Lato&amp;subset=latin-ext" rel="stylesheet">

它在 IE11(在 windows)和 chrome 上都能正确呈现,所以我建议尝试使用 google 中的 google 字体 api 而不是在你的本地机器或你的服务器上下载它

另请查看此 link here 这可能对您有所帮助

Google根据客户端浏览器加载相关的webfont文件。 Chrome 支持 woff2 而 IE 支持 woff。 如果您将通过资源管理器加载相同的 css,您将在样式表中获得 woff 文件。