Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 615 Bytes

googleFont.md

File metadata and controls

29 lines (18 loc) · 615 Bytes

googleFont() Addon

Creates googleFont() method that loads fonts from Google Fonts. Signature:

googleFont(name: string, widths?: number | number[], subsets?: string | string[])

Example

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'
});

Installation

Simply install googleFont addon. Read more about the Addon Installation.