Socket
Book a DemoInstallSign in
Socket

gulp-google-fonts

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

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.

1.0.3
latest
Source
npmnpm
Version published
Weekly downloads
161
-16.15%
Maintainers
1
Weekly downloads
 
Created
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

gulpplugin

FAQs

Package last updated on 16 Nov 2016

Did you know?

Socket

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.