Google Fonts Offline
Getting Started
Sometimes you just have to have fonts locally on your machine. The easiest way is to install package globally:
npm install -g google-fonts-offline
Then use links from Quick Use or your collection as an argument:
goofoffline "http://fonts.googleapis.com/css?family=Open+Sans"
All downloads will be saved in fonts
directory by default and the CSS file with @font-face
declarations will be named fonts.css
. You can use outDir
and outCss
arguments to change this. For example:
goofoffline outDir=tmp outCss=gf.css "http://fonts.googleapis.com/css?family=Ubuntu:200italic"
With greatest HTML post-processing library for Grunt processhtml you may switch between local and hosted variants as simple as:
<!-- build:remove:release --> <!-- /build --> <!-- build:remove:dev --><!-- /build -->