该站点在 chrome 和最新版本的 ff 上运行良好。它似乎也能正常工作并在 IE8 上显示正确的字体;但是在 IE9 中它显示的是更粗的字体。
@font-face{
font-family: 'effraregular';
src: url("http://www.xxxx.com.au/assets/effra_std_rg-webfont.eot");
src: url("http://www.xxxx.com.au/assets/effra_std_rg-webfont.eot?#iefix") format('embedded-opentype'),
url("http://www.xxxx.com.au/assets/effra_std_rg-webfont.woff") format('woff'),
url("http://www.xxxx.com.au/assets/effra_std_rg-webfont.ttf") format('truetype'),
url("http://www.xxxx.com.au/assets/effra_std_rg-webfont.svg#effraregular") format('svg');
font-weight: normal;
font-style: normal;
}
@font-face{
font-family: 'effralight';
src: url("http://www.xxxx.com.au/images/assetimages/fonts/effra_light-webfont.eot");
src: url("http://www.xxxx.com.au/images/assetimages/fonts/effra_light-webfont.eot?#iefix") format('embedded-opentype'),
url("http://www.xxxx.com.au/images/assetimages/fonts/effra_light-webfont.woff") format('woff'),
url("http://www.xxxx.com.au/images/assetimages/fonts/effra_light-webfont.ttf") format('truetype'),
url("http://www.xxxx.com.au/images/assetimages/fonts/effra_light-webfont.svg#effralight") format('svg');
font-weight: normal;
font-style: normal;
}
根据另一个问题,似乎解决方法是将格式从 eot 更改为 embedded-opentype,但是如您所见,这已经完成。
文档中使用的字体系列:
font-family 'effralight','effraregular' 在 IE9 中,它似乎使用后备字体 effraregular(如果我实时编辑 effraregular 以将其删除,它默认为 times new roman 或类似的字体)。
文档类型:
<!DOCTYPE html SYSTEM "about:legacy-compat">
最佳答案
尝试放置 meta
标记到您的 HTML 中作为一种快速解决方法,这将告诉 IE9
模拟 IE8
,带回原始渲染。或 more information on same
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
在你的部分。
但是有了这个你就得和其他人妥协IE9
更好的功能 HTML5
和 CSS3
支持。
一般来说,当你告诉IE9
将字体呈现为 bold
,font-weight
将发生所需的切换的 800
和 900
.
或使用
font-family: 'effralight';
src: url("http://www.xxxx.com.au/images/assetimages/fonts/effra_light-webfont.eot");
src: url("http://www.xxxx.com.au/images/assetimages/fonts/effra_light-webfont.eot?#iefix") format('embedded-opentype'),
url("http://www.xxxx.com.au/images/assetimages/fonts/effra_light-webfont.woff") format('woff'),
url("http://www.xxxx.com.au/images/assetimages/fonts/effra_light-webfont.ttf") format('truetype'),
url("http://www.xxxx.com.au/images/assetimages/fonts/effra_light-webfont.svg#effralight") format('svg');
font-size: 0.75em;
font-weight: 700;
即使使用 nomalize.css 同样可以帮助你
关于html - 仅 IE9 字体问题(呈现回退字体),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23332105/