[英]Firefox 40.0.3 (Windows) not working with font-family
I have the following CSS directive: 我有以下CSS指令:
body {
font-family: system, -apple-system, ".SFNSDisplay-Regular", "Helvetica Neue", "Helvetica", "Calibri", sans-serif !important;
}
In Firefox 40.0.3 for Windows, the font displayed is an aliased (jagged) version of Arial: 在Windows的Firefox 40.0.3中,显示的字体是Arial的别名(锯齿状)版本:
In Firefox 40.0.3 for Mac OS X, the text is rendered correctly: 在Mac OS X的Firefox 40.0.3中,文本正确呈现:
If I remove the Apple system font portion of the CSS, then the Windows version of Firefox works better and uses a typeface available to Windows that can be rendered correctly (either Calibri or whichever anti-aliasable sans serif that is available to Firefox): 如果删除CSS的Apple系统字体部分,则Windows版本的Firefox会更好地工作,并使用可正确显示的Windows可用字体(Calibri或Firefox可用的任何抗锯齿无衬线):
body {
font-family: "Helvetica Neue", "Helvetica", "Calibri", sans-serif !important;
}
Instead of using a platform- or user-agent-specific CSS file, is there a way to modify the CSS so that Firefox under Windows ignores the portion of the font-family
directive it doesn't like? 除了使用特定于平台或用户代理的CSS文件之外,还有一种方法可以修改CSS,以便Windows下的Firefox忽略它不喜欢的
font-family
指令的一部分?
Fixed up with the following directive: 使用以下指令修复:
body {
font-family: ".SFNSDisplay-Regular", -apple-system, "Helvetica Neue", "Helvetica", "Calibri", sans-serif !important;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.