https://github.com/ragingwind/google-font-import
Import google font to local for Chrome Apps
https://github.com/ragingwind/google-font-import
Last synced: 26 days ago
JSON representation
Import google font to local for Chrome Apps
- Host: GitHub
- URL: https://github.com/ragingwind/google-font-import
- Owner: ragingwind
- License: mit
- Created: 2015-06-19T06:47:34.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-08-28T05:38:49.000Z (almost 11 years ago)
- Last Synced: 2025-08-17T21:28:38.007Z (11 months ago)
- Language: JavaScript
- Size: 184 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# google-font-import
> Download google fonts and write html/css file with updated path
## Install
```
$ npm install --save google-font-import
```
## Usage
### Console
```sh
gf-import ./fixture/roboto.html --html=./.tmp --font=./.tmp/fonts --style=./.tmp
```
#### Options
- --html: html path to save the file having new path of style
- --fonts: destination path to download fonts
- --style: stylesheet path to save the file having new path of fonts
### API
```js
var imports = require("google-font-import");
var opts = {
src: './fixture/roboto.html',
htmlpath: './.tmp',
fontpath: './.tmp/fonts',
stylepath: './.tmp'
};
imports(opts).then(function () {
console.log('done')
});
```
## API
### imports(options, [callback])
#### options
##### src
*Required*
The path of source html file having stylesheet of google fonts.
##### htmlpath
*Required*
html path to save a new html file having new path of stylesheet.
##### fontpath
The path for destination to download fonts, If it is not given it will be replaced by htmlpath.
##### stylepath
The path for stylesheet to save the file having new path of fonts. If it is not given it will be replaced by htmlpath.
## License
MIT © [Jimmy Moon](http://ragingwind.me)