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

英文空格和中文空格处理异常,不知道是不是使用问题 #31

Open
Daley opened this issue Apr 29, 2016 · 10 comments
Open

Comments

@Daley
Copy link

Daley commented Apr 29, 2016

使用
Fontmin.glyph({
text: '天地玄黄 宇 宙洪荒',
hinting: false
})
生成的ttf空格都是异常。当然,库里本来是踢除空格不处理的。我强行弄的。
用FontCreater查看space和uni3000都显示异常

字体文件
http://pan.baidu.com/s/1gfFaj7t

@Daley
Copy link
Author

Daley commented May 5, 2016

看到底下代码也有专门判断空格的处理,求解释为什么不生成空格。
在下现在用fontmin压缩ttf用于cocos2dx游戏制作,ttf里没有空格引擎不认,我不知道要改工具还是改引擎
或者有参考资料求推荐

@junmer
Copy link
Contributor

junmer commented May 5, 2016

空格 这里确实是欠考虑了,下个版本会加上
多谢反馈

@Daley
Copy link
Author

Daley commented May 5, 2016

非常感谢

@junmer junmer closed this as completed in 1d4858e May 5, 2016
@junmer
Copy link
Contributor

junmer commented May 5, 2016

@Daley 请更新 0.9.6, 增加配置 trim

Fontmin()
        .src(srcPath)
        .use(Fontmin.glyph({
            text: 'abcd   efg',
            trim: false
        }))
        .dest(destPath);

@Daley
Copy link
Author

Daley commented May 6, 2016

@junmer 现在空格是出来了。不过空格的内容都被替换成别的文字了,应该是哪有类似下面的逻辑,没找着。

 if (unicode === 0xA0 || unicode === 0x3000) {
                unicode++;         
 }

@junmer junmer reopened this May 6, 2016
@lorinlee
Copy link

@junmer 空格全部变成了叹号,悲伤T_T

@stillyu
Copy link

stillyu commented Mar 24, 2017

在fonteditor-core里把相应的glyph的contours置为空数组了,先用着了,只会这样处理

@huangapple
Copy link

请问空格的怎么处理啊

@stillyu
Copy link

stillyu commented Aug 15, 2017

邮箱给我,我把我改的发给你

@huangapple
Copy link

huangtjh@qq.com 谢谢
@stillyu

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

5 participants