--- title: font-variation-settings slug: Web/CSS/@font-face/font-variation-settings tags: - '@font-face' - CSS - CSS Descriptor - CSS Fonts - CSS 記述子 - Reference translation_of: Web/CSS/@font-face/font-variation-settings ---
font-variation-settings は CSS の記述子で、 {{cssxref("@font-face")}} 規則の中で OpenType または TrueType の低レベルのフォントバリエーションを指定することができます。
{{cssinfo}}
/* 既定の設定を使用 */ font-variation-settings: normal; /* OpenType 軸名の値を設定 */ font-variation-settings: "xhgt" 0.7;
normal<string> <number><string> の長さが異なっていたり U+20 - U+7E 以外のコードポイントの範囲の文字が含まれていたりした場合は、プロパティ全体が無効になります。 <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;
}
| 仕様書 | 状態 | 備考 |
|---|---|---|
| {{SpecName('CSS4 Fonts', '#font-rend-desc', 'font-variation-settings')}} | {{Spec2('CSS4 Fonts')}} | 初回定義 |
{{Compat("css.at-rules.font-face.font-variation-settings")}}