@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v20/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
I haven’t been learning since my free trial ran out, but I’m pretty sure you can. Just take a font, and add the different values. See below.
@font-face {
font-family: 'Roboto';
font-style: normal, italic;
font-weight: 100, 400, 700;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v20/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
I think the src is grabbing Roboto normal 400, and the font-style and font-weight property adds the different values you want.
I hope that helps, and I hope it answers your question.
I know I tested a few things out on this little project I was working on to better understand what I was learning, and I’m pretty sure that’s how I did it.
acollins96.github.io (was messing about with media queries at the time. I don’t like the mobile display but it works.