got-google-fonts

0.1.2 • Public • Published

got-google-fonts Build Status

Got Google web fonts by its names

Install

$ npm install --save got-google-fonts

Usage

const googleFontDownload = require('got-google-fonts');
 
googleFontDownload(process.cwd(), 'Roboto', {
    subset: 'greek'
    variant: 'italic'
}).then(files => {
    console.log('Will returns those of files downloaded at dest', files);
});
 

API

googleFontDownload(dest, family, [options])

dest

The path to download

family

The name of the family

options

You can use all of options about Google web fonts APIs except kind which is not alterable, default is webfonts#webfont. It will be passed into querystring.

subset

The script supported by the family.

variant

The style available for the family

version

The font family version. ex) v3

lastModified

The date (format "yyyy-MM-dd") the font family was modified for the last time.

files

JSON of the font family files for each one of the available variants.

License

MIT © Jimmy Moon

Package Sidebar

Install

npm i got-google-fonts

Weekly Downloads

6

Version

0.1.2

License

MIT

Last publish

Collaborators

  • ragingwind