简体   繁体   中英

Firefox 40.0.3 (Windows) not working with font-family

I have the following CSS directive:

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中的快照

In Firefox 40.0.3 for Mac OS X, the text is rendered correctly:

OS X中的快照

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):

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?

Fixed up with the following directive:

body {
    font-family: ".SFNSDisplay-Regular", -apple-system, "Helvetica Neue", "Helvetica", "Calibri", sans-serif !important;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM