font-variation-settings
Quick Summary for font-variation-settings (@font-face)
The font-variation-settings CSS descriptor allows authors to specify low-level OpenType or TrueType font variations in the @font-face rule.
Code Usage for font-variation-settings (@font-face)
/* Use the default settings */ font-variation-settings: normal;  /* Set values for OpenType axis names */ font-variation-settings: "xhgt" 0.7; 
More Details for font-variation-settings (@font-face)

font-variation-settings

The font-variation-settings CSS descriptor allows authors to specify low-level OpenType or TrueType font variations in the @font-face rule.

Syntax

/* Use the default settings */ font-variation-settings: normal;  /* Set values for OpenType axis names */ font-variation-settings: "xhgt" 0.7; 

Values

normal

Text is laid out using default settings.

<string> <number>

When rendering text, the list of OpenType axis names is passed to the text layout engine to enable or disable font features. Each setting is always a <string> of 4 ASCII characters, followed by a <number> indicating the axis value. If the <string> has more or fewer characters or contains characters outside the U+20 - U+7E codepoint range, the whole property is invalid. The <number> can be fractional or negative.

Formal definition

Related at-rule@font-face
Initial valuenormal
Computed valueas specified

Formal syntax

normal | [ <string> <number> ]#

Examples

Setting font weight and stretch in a @font-face rule

@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; } 

Specifications

Specification
CSS Fonts Module Level 4 # font-rend-desc

See also

font-display font-family font-stretch font-style font-weight font-variant font-feature-settings src unicode-range

Last modified: Aug 12, 2021, by MDN contributors

No Items Found.

Add Comment
Type in a Nick Name here
 
Other Categories in CSS
css
Search CSS
Search CSS by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...

Subscribe to weekly updates about things i have added to the site or thought interesting during the last week.

You could also follow me on twitter or not... does anyone even use twitter anymore?

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕

❤️👩‍💻🎮

🪦 2000 - 16 Oct 2022 - Boots
Random Quote
In this case my anchor this week becomes driving almost 2hrs outside of Atlanta to one of my favorite hard core gyms in the world.. MetroFlex aka The Dungeon. The gym owners turn the heat way up so it becomes a fun sweat box and the gym members just watch from afar and leave me alone. I happily drive myself long distances to find MY ANCHOR. Our anchor allows us to have balance, focus and be as productive as possible. And if you're in the middle of a heavy set and your headphones start to fall off your head, like mine did here.. well.. f*ck the headphones. Let em break and fall. You can always get a new pair, but the iron ain't ever gonna lift itself.
Unknown
Random CSS Property

attr()

Note: The attr() function can be used with any CSS property, but support for properties other than content is experimental, and support for the type-or-unit parameter is sparse.
attr() css reference