wunderlist/grunt-local-googlefont — pull request #2 by pepri (2014-11-20 23:20:33+00:00)
Title: Support for subsets, not ignoring woff2 font files, clearer fontBaseDir semantics, preventing multiple downloads

Here are multiple changes I needed to do when trying to use this library. The font, I was trying to use locally, was: http://fonts.googleapis.com/css?family=Open%20Sans:400italic,700italic,400,600,700&subset=latin,latin-ext

Few notes:
- I do not know why you were handling `.woff2` fonts differently. I removed that because I needed the `.woff2` font. I hope this is fine.
- I changed the extension of the CSS file from `.styl` to `.css`. It is not clear to me, why it was set to `.styl`, because `.css` works better (syntax highlighting, all servers set correct content-type, etc.).
- I think, the function to clean the CSS was there mainly for parsing the CSS. I removed CSS cleaning when writing the CSS to the local file, because it is not necessary there (and the "cleaned" CSS was also not correct).
- I changed the logic of `fontBaseDir` option. It was used to specify a prefix that should be removed from the `fontDestination + '/' + filename` in the CSS file. Now it is used to specify a prefix that should be added before the `filename`. That was needed for my case, when the relative path from CSS to the font file was `../fonts/font.woff2` - it could not be achieved without this change. I also think it is now more simple to use.

Best regards,
PePri