Creates googleFont()
method that loads fonts from Google Fonts. Signature:
googleFont(name: string, widths?: number | number[], subsets?: string | string[])
Below example loads Roboto Slab
font at 400
and 700
widths, including cyrillic
characters.
nano.googleFont('Roboto Slab', [400, 700], 'cyrillic');
Now you can use this font.
const className = nano.rule({
fontFamily: '"Roboto Slab", sans'
});
Simply install googleFont
addon. Read more about the Addon Installation.