{font-stretch} Property | CSS: Presentation Layer
Standards Based Development
The font-feature-settings property gets or sets one or more values that specify glyph substitution and positioning in fonts that include OpenType layout features.
font-feature-settings provides low-level control over OpenType font features intended as a method of providing access to these features that are not widely used but are needed for a particular use case. A value of normal means that no change in glyph selection or positioning occurs due to this property.
Syntax
font-feature-settings: normal | feature-tag-value [, feature-tag-value ]
Property Values
normal
No change in glyph substitution or positioning occurs, default value.
feature-tag-value
Comma-separated list of one or more OpenType layout feature tags (each with an optional toggle).
Examples
In the styles below, feat represents an OpenType layout feature tag. The 1 value following the feature tag is a Boolean toggle. If no value is specified, the declaration is treated as if 1 followed the feature tag. A 0 value toggles the tag off.
.sometext{font-feature-settings:"feat" 1}
The example below enables discretionary ligatures on a font that includes them:
.sometext{font-feature-settings:"dlig" 1}
The example below implements multiple OpenType features on a selection of text, by listing each corresponding feature tag and its toggle, separated by commas:
.sometext{font-feature-settings:"dlig" 1, "ss02" 1, "case" 1}
-ms-font-feature-settings
Note: -ms-font-feature-settings has been deprecated.
Microsoft Registered OpenType Settings
| Feature Tag | Friendly Name |
|---|---|
| aalt | Access All Alternates |
| abvf | Above-base Forms |
| abvm | Above-base Mark Positioning |
| abvs | Above-base Substitutions |
| afrc | Alternative Fractions |
| akhn | Akhands |
| blwf | Below-base Forms |
| blwm | Below-base Mark Positioning |
| blws | Below-base Substitutions |
| calt | Contextual Alternates |
| case | Case-Sensitive Forms |
| ccmp | Glyph Composition / Decomposition |
| cfar | Conjunct Form After Ro |
| cjct | Conjunct Forms |
| clig | Contextual Ligatures |
| cpct | Centered CJK Punctuation |
| cpsp | Capital Spacing |
| cswh | Contextual Swash |
| curs | Cursive Positioning |
| cv01-cv99 | Character Variants |
| c2pc | Petite Capitals From Capitals |
| c2sc | Small Capitals From Capitals |
| dist | Distances |
| dlig | Discretionary Ligatures |
| dnom | Denominators |
| expt | Expert Forms |
| falt | Final Glyph on Line Alternates |
| fin2 | Terminal Forms #2 |
| fin3 | Terminal Forms #3 |
| fina | Terminal Forms |
| frac | Fractions |
| fwid | Full Widths |
| half | Half Forms |
| haln | Halant Forms |
| halt | Alternate Half Widths |
| hist | Historical Forms |
| hkna | Horizontal Kana Alternates |
| hlig | Historical Ligatures |
| hngl | Hangul |
| hojo | Hojo Kanji Forms (JIS X 0212-1990 Kanji Forms) |
| hwid | Half Widths |
| init | Initial Forms |
| isol | Isolated Forms |
| ital | Italics |
| jalt | Justification Alternates |
| jp78 | JIS78 Forms |
| jp83 | JIS83 Forms |
| jp90 | JIS90 Forms |
| jp04 | JIS2004 Forms |
| kern | Kerning |
| lfbd | Left Bounds |
| liga | Standard Ligatures |
| ljmo | Leading Jamo Forms |
| lnum | Lining Figures |
| locl | Localized Forms |
| ltra | Left-to-right alternates |
| ltrm | Left-to-right mirrored forms |
| mark | Mark Positioning |
| med2 | Medial Forms #2 |
| medi | Medial Forms |
| mgrk | Mathematical Greek |
| mkmk | Mark to Mark Positioning |
| mset | Mark Positioning via Substitution |
| nalt | Alternate Annotation Forms |
| nlck | NLC Kanji Forms |
| nukt | Nukta Forms |
| numr | Numerators |
| onum | Oldstyle Figures |
| opbd | Optical Bounds |
| ordn | Ordinals |
| ornm | Ornaments |
| palt | Proportional Alternate Widths |
| pcap | Petite Capitals |
| pkna | Proportional Kana |
| pnum | Proportional Figures |
| pref | Pre-Base Forms |
| pres | Pre-base Substitutions |
| pstf | Post-base Forms |
| psts | Post-base Substitutions |
| pwid | Proportional Widths |
| qwid | Quarter Widths |
| rand | Randomize |
| rkrf | Rakar Forms |
| rlig | Required Ligatures |
| rphf | Reph Forms |
| rtbd | Right Bounds |
| rtla | Right-to-left alternates |
| rtlm | Right-to-left mirrored forms |
| ruby | Ruby Notation Forms |
| salt | Stylistic Alternates |
| sinf | Scientific Inferiors |
| size | Optical size |
| smcp | Small Capitals |
| smpl | Simplified Forms |
| ss01 | Stylistic Set 1 |
| ss02 | Stylistic Set 2 |
| ss03 | Stylistic Set 3 |
| ss04 | Stylistic Set 4 |
| ss05 | Stylistic Set 5 |
| ss06 | Stylistic Set 6 |
| ss07 | Stylistic Set 7 |
| ss08 | Stylistic Set 8 |
| ss09 | Stylistic Set 9 |
| ss10 | Stylistic Set 10 |
| ss11 | Stylistic Set 11 |
| ss12 | Stylistic Set 12 |
| ss13 | Stylistic Set 13 |
| ss14 | Stylistic Set 14 |
| ss15 | Stylistic Set 15 |
| ss16 | Stylistic Set 16 |
| ss17 | Stylistic Set 17 |
| ss18 | Stylistic Set 18 |
| ss19 | Stylistic Set 19 |
| ss20 | Stylistic Set 20 |
| subs | Subscript |
| sups | Superscript |
| swsh | Swash |
| titl | Titling |
| tjmo | Trailing Jamo Forms |
| tnam | Traditional Name Forms |
| tnum | Tabular Figures |
| trad | Traditional Forms |
| twid | Third Widths |
| unic | Unicase |
| valt | Alternate Vertical Metrics |
| vatu | Vattu Variants |
| vert | Vertical Writing |
| vhal | Alternate Vertical Half Metrics |
| vjmo | Vowel Jamo Forms |
| vkna | Vertical Kana Alternates |
| vkrn | Vertical Kerning |
| vpal | Proportional Alternate Vertical Metrics |
| vrt2 | Vertical Alternates and Rotation |
| zero | Slashed Zero |