You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
报错如下:
D:\Project\JavaScript\webfont>font-spider demo.html
Font name: SourceHanSans-Normal
Original size: 180193.4 KB
Include chars: 中体展思文源现黑
ERROR Error: ENOENT, no such file or directory 'D:\Project\JavaScript\webfont\fo
nts\SourceHanSans-Normal.eot'
at Error (native)
at Object.fs.statSync (fs.js:801:18)
at D:\Program Files\Node\node_modules\font-spider\src\index.js:177:50
at Array.forEach (native)
at D:\Program Files\Node\node_modules\font-spider\src\index.js:175:32
at D:\Program Files\Node\node_modules\font-spider\node_modules\promise\lib\c
ore.js:33:15
at flush (D:\Program Files\Node\node_modules\font-spider\node_modules\promis
e\node_modules\asap\asap.js:27:13)
at process._tickCallback (node.js:355:11)
报错如下:
D:\Project\JavaScript\webfont>font-spider demo.html
Font name: SourceHanSans-Normal
Original size: 180193.4 KB
Include chars: 中体展思文源现黑
ERROR Error: ENOENT, no such file or directory 'D:\Project\JavaScript\webfont\fo
nts\SourceHanSans-Normal.eot'
at Error (native)
at Object.fs.statSync (fs.js:801:18)
at D:\Program Files\Node\node_modules\font-spider\src\index.js:177:50
at Array.forEach (native)
at D:\Program Files\Node\node_modules\font-spider\src\index.js:175:32
at D:\Program Files\Node\node_modules\font-spider\node_modules\promise\lib\c
ore.js:33:15
at flush (D:\Program Files\Node\node_modules\font-spider\node_modules\promis
e\node_modules\asap\asap.js:27:13)
at process._tickCallback (node.js:355:11)
我的目录结构
webfont
|--fonts
|--SourceHanSans-Normal.ttf
|--demo.html
|--fonts.css
我在webfont目录下运行命令font-spider demo.html就是上面的报错,不是说只要有ttf存在,其他字体都是字蛛自动生成么?
fonts.css内容如下:
@font-face {
font-family: 'SourceHanSans-Normal';
src: url('fonts/SourceHanSans-Normal.eot');
src: url('fonts/SourceHanSans-Normal.eot?#font-spider') format('embedded-opentype'),
url('fonts/SourceHanSans-Normal.woff') format('woff'),
url('fonts/SourceHanSans-Normal.ttf') format('truetype'),
url('fonts/SourceHanSans-Normal.svg') format('svg');
font-weight: normal;
font-style: normal;
}
The text was updated successfully, but these errors were encountered: