forJrking / FontZip

字体提取工具(APP瘦身神器、APK压缩工具)
890 stars 115 forks source link

otf 字体不支持 #3

Open jp1017 opened 8 years ago

jp1017 commented 8 years ago

SourceHanSansCN-Regular.zip

压缩上面的 otf 字体报错:

$ java -jar sfnttool.jar -s '0123456789' SourceHanSansCN-Regular.otf                                                                  sou.otf
Exception in thread "main" java.lang.NullPointerException
        at com.google.typography.font.tools.sfnttool.GlyphCoverage.get                                                                Glyph(Unknown Source)
        at com.google.typography.font.tools.sfnttool.GlyphCoverage.tou                                                                chGlyph(Unknown Source)
        at com.google.typography.font.tools.sfnttool.GlyphCoverage.get                                                                GlyphCoverage(Unknown Source)
        at com.google.typography.font.tools.sfnttool.SfntTool.subsetFo                                                                ntFile(Unknown Source)
        at com.google.typography.font.tools.sfnttool.SfntTool.main(Unk                                                                nown Source)
forJrking commented 8 years ago

提取otf字体测试通过了,建议你使用我最新的工具试试。

waylife commented 5 years ago

otf字体提取确实会出现问题,应该是sfnttool.jar 的问题 可采用otf->ttf然后再提取ttf字体的方案 https://convertio.co/zh/otf-ttf/