autoprefixer icon indicating copy to clipboard operation
autoprefixer copied to clipboard

support font-feature-settings

Open ianstormtaylor opened this issue 12 years ago • 6 comments

hey, it would be awesome if font-feature-settings was supported: http://caniuse.com/#feat=font-feature

ianstormtaylor avatar Jun 24 '13 23:06 ianstormtaylor

Easy :). Try to add it on this week :).

ai avatar Jun 25 '13 04:06 ai

awesome :) sorry for not PRing, a little thrown off by CS

ianstormtaylor avatar Jun 25 '13 04:06 ianstormtaylor

Fixed f73c12b43365ee9eb158c40fca863ff1d768396b

Spec has a lot of properties, but I add only which is really used in browsers by Peter Beverloo’s prefixes table:

  • font-feature-settings
  • font-variant-ligatures
  • font-language-override
  • font-kerning

Test:

~/Dev/autoprefixer → echo "a { font-feature-settings: 'dlig=1,ss01=1' }" | ./bin/autoprefixer 
a {
  -webkit-font-feature-settings: 'dlig=1,ss01=1';
  -moz-font-feature-settings: 'dlig=1,ss01=1';
  font-feature-settings: 'dlig=1,ss01=1';
}

ai avatar Jun 26 '13 13:06 ai

thank you so much!

ianstormtaylor avatar Jun 26 '13 17:06 ianstormtaylor

I found that font-feature-settings does not generate the old syntax for older versions of Firefox.

See: Firefox 4: OpenType font feature support

  • https://htmlcss.fandom.com/wiki/-moz-font-feature-settings
  • https://stackoverflow.com/questions/15160897/font-feature-settings-what-is-the-correct-syntax
/*
* Prefixed by https://autoprefixer.github.io
* PostCSS: v8.4.14,
* Autoprefixer: v10.4.7
* Browsers: > 0%
*/

.example {
    -webkit-font-feature-settings: "ss01" 1, "ss08" on;
       -moz-font-feature-settings: "ss01" 1, "ss08" on;
            font-feature-settings: "ss01" 1, "ss08" on;
}

yisibl avatar Oct 17 '24 07:10 yisibl

Firefox 34 is too old to spend my time. PR from somebody motived is needed.

ai avatar Oct 18 '24 14:10 ai