monks/font_variant_alternates

The font-variant-alternates CSS property controls the usage of alternate glyphs. These alternate glyphs may be referenced by alternative names defined in {{cssxref(“@font-feature-values”)}}.

The {{cssxref(“@font-feature-values”)}} at-rule can be used to associate, for a given font face, a human-readable name with a numeric index that controls a particular OpenType font feature. For features that select alternative glyphs (stylistic, styleset, character-variant, swash, ornament or annotation), the font-variant-alternates property can then reference the human-readable name in order to apply the associated feature.

This allows CSS rules to enable alternative glyphs without needing to know the specific index values that a particular font uses to control them.

Values

pub const historical_forms: #(String, String)
  • : This keyword enables historical forms — glyphs that were common in the past but not today. It corresponds to the OpenType value hist.
pub const inherit: #(String, String)
pub const initial: #(String, String)
pub const normal: #(String, String)
  • : This keyword deactivates alternate glyphs.
pub fn raw(value: String) -> #(String, String)

Enter a raw string value for font-variant-alternates

pub const revert: #(String, String)
pub const revert_layer: #(String, String)
pub const unset: #(String, String)
pub fn var(variable: String) -> #(String, String)

Enter a variable name to be used for font-variant-alternates. It will be wrapped in var() and have -- prepended.

Search Document