在 IE11 中使用安装的字体与 webfont 时打开 Sans 字体更粗

Open Sans font thicker when using installed font vs webfont in IE11

我在 IE11 中遇到问题,Open Sans 字体在本地安装了该字体的计算机上显示时比从网站上以 Web 字体形式提取字体的计算机上显示的要粗很多。

这发生在使用 Google 字体 Open Sans 的内部网站上。字体文件和 CSS 已下载并直接包含在应用程序中,因为它需要离线功能(因此它不会从 Google 的服务器中提取)。

我通过从我的计算机上卸载 Open Sans 发现了这个问题,并注意到它显示正常,但如果它安装在我的计算机上,它会更厚。需要明确的是,它不仅仅是显示粗体字体,因为我仍然可以更改字体粗细,它仍然会变得更加粗体。此外,这只发生在 IE11 中,无论情况如何,在 Chrome 中都可以正常工作。查看 Chrome 中呈现的字体显示使用了正确的权重。我不知道如何在 IE 中检查它。

这是用于在网站中包含字体的CSS:

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  src: local('Open Sans Regular'), local('OpenSans-Regular'), url(fonts/OpenSans-Regular.woff2?v=1.5.0) format('woff2'), url(#{$assets-path}fonts/OpenSans-Regular.woff?v=1.5.0) format('woff');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 600;
  src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'), url(fonts/OpenSans-SemiBold.woff2?v=1.5.0) format('woff2'), url(#{$assets-path}fonts/OpenSans-SemiBold.woff?v=1.5.0) format('woff');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 700;
  src: local('Open Sans Bold'), local('OpenSans-Bold'), url(fonts/OpenSans-Bold.woff2?v=1.5.0) format('woff2'), url(#{$assets-path}fonts/OpenSans-Bold.woff?v=1.5.0) format('woff');
}

这里是电脑上安装IE时字体的截图:

这是未安装字体时的截图:

我最终删除了对字体本地副本的引用,通过从每种字体中删除以下代码来强制站点使用下载的副本:

local('Open Sans SemiBold'), local('OpenSans-SemiBold')