Socket
Socket
Sign inDemoInstall

gulp-google-fonts

Package Overview
Dependencies
102
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gulp-google-fonts

Downloads desired fonts from, encodes them to base64 and saves in format specific css files.


Version published
Weekly downloads
116
increased by12.62%
Maintainers
1
Install size
4.54 MB
Created
Weekly downloads
 

Readme

Source

gulp-google-fonts

The complete solution for webfonts using Gulp

Uses Neon for configuration. Inspired by gulp-google-fonts-base64-css.

Downloads desired fonts from Google fonts, encodes them to base64 and saves in format specific css files. You can then decide which to serve to specific clients. Wonder how? Check out my Fontloader.

Example configuration

config.neon
fonts:
	- #Here starts font declaration
		family:	Roboto
		variants:
			- 300
			- 400
			- 700
		subsets:
			- latin
			- latin-ext
	- #Here starts font declaration
		family: Roboto Condensed
		variants:
			- 400
			- 400i
			- 700
			- 700i
		subsets:
			- latin-ext
	- #Here starts font declaration
		family: Roboto Slab
		variants:
			- 400
			- 700
		subsets:
			- latin-ext

Example gulpfile

gulpfile.js
var gulp = require('gulp');
var ggf = require('gulp-google-fonts');
gulp.task('getFonts', function () {
  return gulp.src('config.neon')
	.pipe(ggf())
	.pipe(gulp.dest('dist/fonts'));
});

##TODO

  • Support more configurations, namely JSON.
  • Make human readable errors.
  • ?? Support svg fonts ??

Keywords

FAQs

Last updated on 16 Nov 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc