--- title: font-variation-settings slug: Web/CSS/@font-face/font-variation-settings tags: - '@font-face' - CSS - Descripteur - Reference translation_of: Web/CSS/@font-face/font-variation-settings ---
Le descripteur font-variation-settings
, associé à la règle @ {{cssxref("@font-face")}} permet d'indiquer les variations de police de bas niveau pour les polices OpenType ou TrueType.
/* On utilise les paramètres par défaut */ font-variation-settings: normal; /* On indique les valeurs pour les noms des axes OpenType */ font-variation-settings: "xhgt" 0.7;
normal
<string> <number>
{{csssyntax}}
@font-face { font-family: 'OpenTypeFont'; src: url('open_type_font.woff2') format('woff2'); font-weight: normal; font-style: normal; font-variation-settings: 'wght' 400, 'wdth' 300; }
Spécification | État | Commentaires |
---|---|---|
{{SpecName('CSS4 Fonts', '#font-rend-desc', 'font-variation-settings')}} | {{Spec2('CSS4 Fonts')}} | Définition initiale. |
{{cssinfo}}
{{Compat("css.at-rules.font-face.font-variation-settings")}}