How to import a style of font with google fonts?

I’m having trouble customizing my font (Roboto) that I imported with google fonts. I want to use Roboto light but I can’t find a separate link to it anywhere. Because of that I assumed I was just supposed to use font-weight but that doesn’t seem to work correctly either

From the “Getting Started” guide:-

The Google Fonts API provides the regular version of the requested fonts by default. To request other styles or weights, append a colon (:slight_smile: to the name of the font, followed by a list of styles or weights separated by commas (,).
For example:,bolditalic|Inconsolata:italic|Droid+Sans

so where you link to the font, try:-

<link rel="stylesheet" type="text/css" href="">

Or to use the latest syntax

<link href=",300i" rel="stylesheet">

Where 300 is the font weight, and 300i is the italic variant.


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.