Read the axes of the actual file
A variable font contains adjustable design parameters. wght commonly controls weight, wdth controls width, and opsz can adjust the design for optical size. A file may provide only one of those axes. Read its specimen or file data first, and record the actual minimum and maximum values before designing a control.
Make a proof with one axis at a time
For a web prototype, set the same headline at several supported weights and keep the text box fixed. If the family also has a width axis, make a second proof at one weight with different widths. Watch where the long headline wraps and inspect the paragraph separately. The font size guide explains the distinct size control.
Declare the range and check the output
In an @font-face declaration, list the weight range the variable file supports. Use standard CSS properties for registered axes where applicable, and use font-variation-settings for axis values that require it. See the web font loading guide and check the rendered family. For a separate social caption, the online lettering styler changes the characters you copy, while the axis selection belongs to the font and the app.
Your questions, answered.
Can any variable font change width?
Only a file with a width axis provides that width control. Inspect the supported axes in the actual font.
Can I enter any weight number?
Choose a value inside the range supported by the file and declared for that face.
Sources & background
Sources supporting this page’s explanations. Practical examples are our editorial suggestions.