{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

OpenType Layout Tag Registry Registered Features
Feature TagFriendly Name
aaltAccess All Alternates
abvfAbove-base Forms
abvmAbove-base Mark Positioning
abvsAbove-base Substitutions
afrcAlternative Fractions
akhnAkhands
blwfBelow-base Forms
blwmBelow-base Mark Positioning
blwsBelow-base Substitutions
caltContextual Alternates
caseCase-Sensitive Forms
ccmpGlyph Composition / Decomposition
cfarConjunct Form After Ro
cjctConjunct Forms
cligContextual Ligatures
cpctCentered CJK Punctuation
cpspCapital Spacing
cswhContextual Swash
cursCursive Positioning
cv01-cv99Character Variants
c2pcPetite Capitals From Capitals
c2scSmall Capitals From Capitals
distDistances
dligDiscretionary Ligatures
dnomDenominators
exptExpert Forms
faltFinal Glyph on Line Alternates
fin2Terminal Forms #2
fin3Terminal Forms #3
finaTerminal Forms
fracFractions
fwidFull Widths
halfHalf Forms
halnHalant Forms
haltAlternate Half Widths
histHistorical Forms
hknaHorizontal Kana Alternates
hligHistorical Ligatures
hnglHangul
hojoHojo Kanji Forms (JIS X 0212-1990 Kanji Forms)
hwidHalf Widths
initInitial Forms
isolIsolated Forms
italItalics
jaltJustification Alternates
jp78JIS78 Forms
jp83JIS83 Forms
jp90JIS90 Forms
jp04JIS2004 Forms
kernKerning
lfbdLeft Bounds
ligaStandard Ligatures
ljmoLeading Jamo Forms
lnumLining Figures
loclLocalized Forms
ltraLeft-to-right alternates
ltrmLeft-to-right mirrored forms
markMark Positioning
med2Medial Forms #2
mediMedial Forms
mgrkMathematical Greek
mkmkMark to Mark Positioning
msetMark Positioning via Substitution
naltAlternate Annotation Forms
nlckNLC Kanji Forms
nuktNukta Forms
numrNumerators
onumOldstyle Figures
opbdOptical Bounds
ordnOrdinals
ornmOrnaments
paltProportional Alternate Widths
pcapPetite Capitals
pknaProportional Kana
pnumProportional Figures
prefPre-Base Forms
presPre-base Substitutions
pstfPost-base Forms
pstsPost-base Substitutions
pwidProportional Widths
qwidQuarter Widths
randRandomize
rkrfRakar Forms
rligRequired Ligatures
rphfReph Forms
rtbdRight Bounds
rtlaRight-to-left alternates
rtlmRight-to-left mirrored forms
rubyRuby Notation Forms
saltStylistic Alternates
sinfScientific Inferiors
sizeOptical size
smcpSmall Capitals
smplSimplified Forms
ss01Stylistic Set 1
ss02Stylistic Set 2
ss03Stylistic Set 3
ss04Stylistic Set 4
ss05Stylistic Set 5
ss06Stylistic Set 6
ss07Stylistic Set 7
ss08Stylistic Set 8
ss09Stylistic Set 9
ss10Stylistic Set 10
ss11Stylistic Set 11
ss12Stylistic Set 12
ss13Stylistic Set 13
ss14Stylistic Set 14
ss15Stylistic Set 15
ss16Stylistic Set 16
ss17Stylistic Set 17
ss18Stylistic Set 18
ss19Stylistic Set 19
ss20Stylistic Set 20
subsSubscript
supsSuperscript
swshSwash
titlTitling
tjmoTrailing Jamo Forms
tnamTraditional Name Forms
tnumTabular Figures
tradTraditional Forms
twidThird Widths
unicUnicase
valtAlternate Vertical Metrics
vatuVattu Variants
vertVertical Writing
vhalAlternate Vertical Half Metrics
vjmoVowel Jamo Forms
vknaVertical Kana Alternates
vkrnVertical Kerning
vpalProportional Alternate Vertical Metrics
vrt2Vertical Alternates and Rotation
zeroSlashed Zero

References and Resources