本文介绍了不支持Safari中的字体特性设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用 font-feature-settings ,我在所有主流浏览器(除了桌面版和移动版)上都取得了成功。我使用这个语法:

pre code $ .smallcaps {
font-feature-settings:'smcp'1;
-webkit-font-feature-settings:'smcp'1;
-moz-font-feature-settings:'smcp'1;

$ / code>

Safari不支持 font-feature-settings ,或者我做错了什么?如果在Safari中仍然支持OpenType功能,我想看一个实例。

解决方案

根据, font- Safari和Opera不支持功能设置。但是,这些信息的日期是:表示支持Safari 6.1版本(还有未指定的部分支持从版本4.0)。但是用于Windows的最后一个Safari版本是5.1.7,它缺少支持(在我的测试中证实)。在Opera中,支持从版本15.0(测试18.0,工作正常)。



实际上所有浏览器都支持 font-variant:small-caps ,这在理论上是首选的方法,但Safari(与大多数浏览器一样)以与其他浏览器相同的方式实现:使用缩小的大写字母,而不是适当的小写字母。 (这至少适用于Safari 5.1.7。)


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.

解决方案

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

这篇关于不支持Safari中的字体特性设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-03 17:06