Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

我在转换汉仪中黑简是报错 #7

Open
lzbSun opened this issue Jan 8, 2015 · 11 comments
Open

我在转换汉仪中黑简是报错 #7

lzbSun opened this issue Jan 8, 2015 · 11 comments

Comments

@lzbSun
Copy link

lzbSun commented Jan 8, 2015

C:\Users\YOUNG_9>font-spider C:\Users\YOUNG_9\Desktop\flowPath\flow.html
Optimizer error.
C:\Users\YOUNG_9\Desktop\flowPath\font\FZJT.ttf
Can't locate Digest/SHA.pm in @INC (@INC contains: ext/Font-TTF/lib /usr/lib/per
l5/5.8.8/msys /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/msys /usr/lib/
perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl .) at Font/Subsetter.pm line 31.
BEGIN failed--compilation aborted at Font/Subsetter.pm line 31.
Compilation failed in require at ./subset.pl line 11.
BEGIN failed--compilation aborted at ./subset.pl line 11.

我还换了其他字体,还是出现这样的错误。

<style type="text/css">
/*声明 WebFont*/
@font-face {
  font-family: 'hyzhj';
  src: url('font/hyzhj.eot');
  src:
    url('font/hyzhj.eot?#font-spider') format('embedded-opentype'),
    url('font/hyzhj.woff') format('woff'),
    url('font/hyzhj.ttf') format('truetype'),
    url('font/hyzhj.svg') format('svg');
  font-weight: normal;
  font-style: normal;
}

/*使用选择器指定字体*/
.test {
    font-family: 'hyzhj';
}
</style>

是我的用法有问题吗?

@aui
Copy link
Owner

aui commented Jan 8, 2015

试下方正字库的字体是否存在此报错?

@lzbSun
Copy link
Author

lzbSun commented Jan 8, 2015

我试了你给的FZJT.ttf的这个字体,也是报的这个错误。

@aui
Copy link
Owner

aui commented Jan 8, 2015

源码给出的 test 目录也无法运行?如果是这样,可能和你系统的 Perl 环境有关

@lzbSun
Copy link
Author

lzbSun commented Jan 8, 2015

那我系统需要怎么样的一个Perl环境?

@aui
Copy link
Owner

aui commented Jan 10, 2015

环境问题我也很难定位,你能否在其他机器上先试下?

@airyland
Copy link

这个错我也在windows 7 遇到过。确定已经安装好Perl,然后安装font-spider,然后不要用Gitbash等工具执行,直接用CMD执行。

@aui
Copy link
Owner

aui commented Jan 11, 2015

可以将 github 上的源码下载下来,然后执行:

node test/test.js

如果正常,说明你的字体文件不支持(部分ttf包含特殊数据,字蛛暂时无法解析);否则是环境问题

@lzbSun
Copy link
Author

lzbSun commented Jan 20, 2015

Error: Cannot find module 'glob'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (C:\Users\linling\Desktop\font-spider-master\src\index
.js:8:12)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)

出现这个的问题。

@aui
Copy link
Owner

aui commented Jan 20, 2015

使用源码方式安装,你应该先安装依赖:

npm install

@alphatr
Copy link

alphatr commented Jan 26, 2015

我也遇到这个问题,看了下是 perl 缺少模块 cpan,官网在这里 http://www.cpan.org/, 我的是 CentOS 的系统,所以直接执行依赖安装就好了

 yum install cpan

@aui
Copy link
Owner

aui commented Jan 26, 2015

感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants