https://github.com/ragingwind/got-google-fonts
Got Google web fonts by its names
https://github.com/ragingwind/got-google-fonts
Last synced: 12 months ago
JSON representation
Got Google web fonts by its names
- Host: GitHub
- URL: https://github.com/ragingwind/got-google-fonts
- Owner: ragingwind
- License: mit
- Created: 2016-05-09T08:29:14.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-06-28T09:35:51.000Z (about 9 years ago)
- Last Synced: 2025-06-13T08:08:05.206Z (about 1 year ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# got-google-fonts [](https://travis-ci.org/ragingwind/got-google-fonts)
> Got Google web fonts by its names
## Install
```
$ npm install --save got-google-fonts
```
## Usage
```js
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](https://developers.google.com/fonts/docs/developer_api#a_quick_example) 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](http://ragingwind.me)