Google font not displaying correctly

Permalink
Hi there,
I have added the Roboto font family into Framework theme.
It works OK, except for font-style italics, which are displayed only on weight 400.

According to Google Fonts, the line to import the family is this one:
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');


But I get a parse error. If instead of css2 I use css, like this:

@import url('https://fonts.googleapis.com/css?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');


I don't get any error, the site performs OK but italics only display in weight 400.

Does anybody know?
Thank you!
V.

byvictoria
 
kfog replied on at Permalink Best Answer Reply
kfog
try:
@import url('https://fonts.googleapis.com/css?family=Roboto:100,100i,300,300i,400,400i,500,500i,700,700i,900,900i&display=swap');
byvictoria replied on at Permalink Reply
byvictoria
Worked like a charm, thank you @kfog!!!