问题
Trying to use font-feature-settings
, I get successful result in all major browsers but Safari (neither desktop nor mobile). I use this syntax:
.smallcaps {
font-feature-settings: 'smcp' 1;
-webkit-font-feature-settings: 'smcp' 1;
-moz-font-feature-settings: 'smcp' 1;
}
Does Safari not support font-feature-settings
, or do I something wrong? If there still is support for OpenType features in Safari, I’d like to see a live example.
回答1:
According to MDN info, font-feature-settings
is not supported in Safari and Opera. However, the information is dated: CanIuse says that support exists from Safari version 6.1 (and unspecified “partial support” from version 4.0). But the last Safari version for Windows is 5.1.7, and it lacks support (confirmed in my tests). And in Opera, supports exists from version 15.0 (tested 18.0, works OK).
Practically all browsers support font-variant: small-caps
, which is in theory the preferred approach, but Safari (like most browsers) implements it the same way as other browsers: by using reduced-size capital letters, instead of proper small capitals. (This applies at least to Safari 5.1.7.)
来源:https://stackoverflow.com/questions/20275418/no-support-for-font-feature-settings-in-safari