3

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.

user3047089
  • 103
  • 1
  • 1
  • 6
  • 1
    (Small caps? Why not use `font-variant: small-caps`?) – Ry- Nov 28 '13 at 22:11
  • 1
    First, `font-variant: small-caps` makes false small caps, see the example: http://content.screencast.com/users/z1011001010111010010/folders/Snagit/media/d70ff39f-d02f-4997-b979-48246c39afdc/11.29.2013-02.32.png . Second, my question is not only about small caps, but also about OpenType features in general. It seems that Safari does not support them. – user3047089 Nov 28 '13 at 22:35
  • Have you tried any other OpenType features, like old-style figures? Let me know if you get it working, because I never have in any browser using any set of prefixes or fonts. :'( – Ry- Nov 28 '13 at 22:37
  • 1
    Here is the example of some OpenType features, including old-style figures: http://2.chebykin.cz8.ru/opentype.html . It works in all modern browsers except Safari. – user3047089 Nov 29 '13 at 19:09

1 Answers1

2

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

Jukka K. Korpela
  • 195,524
  • 37
  • 270
  • 390
  • 1
    I have just examined the latest Opera version for Windows, and it supports `font-feature-settings` perfectly. That is why I don’t trust the sites like MDN and prefer to ask experts here at Stack Overflow. – user3047089 Nov 29 '13 at 09:34
  • @user3047089, my tests say otherwise: testing with Opera 12.16 Build 1860 (and “Check for Updates” says that this is the newest version) on Win 7, with test page http://www.cs.tut.fi/~jkorpela/font-features.html8 I see no sign of support. What are we doing differently? – Jukka K. Korpela Nov 29 '13 at 13:36
  • Oops, right, that was wrong Opera (in the old branch). The new WebKit-based Opera (version 17) indeed supports font features. – Jukka K. Korpela Nov 29 '13 at 13:42