gbw

gulp-base64-woff-css

Gulp plugin to generate css files with Base64 encoded font css from woff

Showing:

Popularity

Downloads/wk

1

GitHub Stars

0

Maintenance

Last Commit

6yrs ago

Contributors

0

Package

Dependencies

1

Size (min+gzip)

5.3KB

License

GPL-3.0

Type Definitions

Tree-Shakeable

No?

Categories

Readme

gulp-google-fonts-base64-css

Gulp plugin to generate css files with Base64 encoded font data from Google Fonts

inspired by https://github.com/ygoto3/gulp-base64-webfont-css and https://github.com/battlesnake/gulp-google-webfonts

Example

fonts.list

# Google format
Roboto:500,500italic&subset=greek

gulpfile.js

var gulp = require('gulp');
var concat = require('gulp-concat');
var cssmin = require('gulp-minify-css');
var webFontsBase64 = require('gulp-google-fonts-base64-css');
    
gulp.task('fonts', function () {
    return gulp.src('./fonts.list')
      .pipe(webFontsBase64())
      .pipe(concat('web-fonts.css'))
      .pipe(cssmin())
      .pipe(gulp.dest('./css'));
});

Output

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 500;
  src: local("Roboto"),
    url("data:application/x-font-woff;base64,{{base64}}") format("woff");
}
@font-face {
  font-family: "Roboto";
  font-style: italic;
  font-weight: 500;
  src: local("Roboto"),
    url("data:application/x-font-woff;base64,{{base64}}") format("woff");
}
...
and others

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial