Answer the question
In order to leave comments, you need to log in
How to make gulp-fontgen work?
Can't get gulp-fongen to work.
gulpfile.js:
var gulp = require("gulp");
var fontgen = require("gulp-fontgen");
gulp.task('fontgen', function () {
gulp.src('app/fonts/**/*.ttf')
.pipe(fontgen({dest: 'dist/'}))
});
[22:36:23] Starting 'fontgen'...
[22:36:23] Finished 'fontgen' after 15 ms
Answer the question
In order to leave comments, you need to log in
I still recommend this package https://github.com/ecomfe/fontmin It can reduce the size of generated fonts. font-gen generates very large fonts.
In general, it's better to quit this idea and use www.fontsquirrel.com The service allows you to generate the correct css and files of the optimal size.
gulp.task('fontgen', function () {
return gulp.src('app/fonts/**/*.ttf')
.pipe(fontgen({dest: "./dest/"}))
.pipe(gulp.dest('dist');
});
Sorry for not replying for so long. Corrected. The result is the same, it stops on the second line and that's it.
I found here gulpfile.js where it is written how to use gulp-fontgen:
// FONT GENERATION TASK
gulp.task('fontgen', function(){
return gulp.src(paths.fonts.src)
.pipe(fontgen({
dest: paths.fonts.dest
}));
});
brew install Caskroom/cask/xquartz
brew install fontforge ttfautohint ttf2eot bat
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question