Traditional fonts typically require a separate file for each weight variant, such as 300, 400, and 500. However, with variable fonts, all weight combinations can be accessed through a single compact font file. This is extremely advantageous for web design. I am currently experimenting with the Inter font available on Google Fonts, which is advertised as a variable font by both Google and the designer's site.
Despite the claims of being a variable font, when I try to select the Inter font in Google Fonts, I still need to individually choose the weights I wish to use. The generated <link>
tag also specifies these weights, implying that separate files are being downloaded:
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600&display=swap" rel="stylesheet">
An additional issue I have encountered is the lack of italics support in the font. When attempting to render italics, faux italics are used instead. This was verified by applying the CSS rule font-synthesis:none
:
font-style: italic;
font-synthesis: none ; /* Disables faux italics and other simulated styles:
if no italic style is installed, defaults to normal
I am curious as to why this is happening and how I can utilize the full potential of the variable version of Inter via Google Fonts, including accessing the italics feature?