9

When you try to download the font woff format, I received an error:

OTS parsing error: incorrect file size in WOFF header

What am I doing wrong ?

1 Answer 1

3

This error can occur if you use a gulp or a grunt, forgetting to add fonts formats to src of task.

In my case, it happened when using gulp-rigger, which changes the contents of the file, taking it as text .

Since fonts file is a binary format, then output is broken file.

Fix for me:

gulp.task('start', function () { // with filter by file type (.js or .html) gulp.src(['./src/**/*.js', './src/**/*.html']) .pipe(rigger()) .pipe(gulp.dest('./target')); }); 

Instead:

gulp.task('start', function () { // all files, iclude fonts .woff gulp.src('./src/**/*.*') .pipe(rigger()) .pipe(gulp.dest('./target')); }); 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.