ecomfe / fontmin

Minify font seamlessly
http://ecomfe.github.io/fontmin
MIT License
5.62k stars 311 forks source link

RangeError:Offset is outside the bounds of the DataView,why??? #69

Open linmeiren opened 5 years ago

linmeiren commented 5 years ago

这是国人写的库吗?我能问一个比较弱智的问题不?为啥我编译的时候出现这个问题呢? RangeError:Offset is outside the bounds of the DataView。 我是照着文档的指示,下载包,然后创建fontmin.js,使用最简单的代码进行运行的,就像下面这样:

var Fontmin = require('fontmin');
var fontmin = new Fontmin()
    .src('font/*.ttf')
    .dest('build/fonts');
fontmin.run(function (err, files) {
    if (err) {
        throw err;
        return;
    }
    console.log('done');
    console.log(files[0]);
    // => { contents: <Buffer 00 01 00 ...> }
});

然后在终端使用:node fontmin.js指令,node的版本是8.11.1的,出的错误不知道啥意思,求指教,谢谢。

Gitby-Leo commented 4 years ago

用mac客户端的时候也会有这行报错提示。。win是无反应

willin commented 4 years ago

same error

la3rence commented 1 year ago

same here with node 14/16/18. i am now build with React & Next.js website via SSG tech stack. I'm afraid this repository is not maintained anymore. is there any new method to do things like shaking the web font for CJK?