Preview 4 of IE10 includes support for the font-feature-settings property. Our earlier Gabriola example could thus be written:
The
The OpenType feature registry defines the list of possible tags (also documented here and standardized by ISO). Here a few of the most popular:
For a good illustrated introduction to these features and many others, we recommend the Layout Features section of the FontFont OpenType User Guide.
The more common features are on/off switches. Feature values of off or zero turn the feature off; a value of on or any positive integer activates it. For some features, an integer value gives access to several options. This is usually the case for swashes (‘swsh’). If no value is specified for the feature, a value of 1 is assumed. All the following declarations are thus equivalent for the purpose of our Gabriola example:
p#demo {
font-family: Gabriola, cursive;
font-size: 24pt;
-ms-font-feature-settings: "ss06" 1;
}
-ms-font-feature-settings
declaration above turns on a stylistic set supported by the font (ss06
). The property takes either a value of ‘normal
’ – no change in glyph selection or positioning – or a comma-separated list of one or more features. Each feature combines a four-letter OpenType feature tag and a value. In the example above, “ss06
” is the OpenType feature tag for stylistic set 6. We assign the value 1 to the feature to turn it on.The OpenType feature registry defines the list of possible tags (also documented here and standardized by ISO). Here a few of the most popular:
OpenType tag | Enables |
---|---|
kern | Kerning |
liga | Standard ligatures |
dlig | Discretionary ligatures |
smcp | Small capitals |
subs | Subscript |
sups | Superscript |
swsh | Swashes |
ss01 , ss02 , …, ss20 | Stylistic sets 1 to 20 |
The more common features are on/off switches. Feature values of off or zero turn the feature off; a value of on or any positive integer activates it. For some features, an integer value gives access to several options. This is usually the case for swashes (‘swsh’). If no value is specified for the feature, a value of 1 is assumed. All the following declarations are thus equivalent for the purpose of our Gabriola example:
-ms-font-feature-settings: "ss06" 1;
-ms-font-feature-settings: "ss06" on;
-ms-font-feature-settings: "ss06";
Комментариев нет:
Отправить комментарий