forJrking / FontZip

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

此处放入需要提取的文字 #2

Closed jp1017 closed 8 years ago

jp1017 commented 8 years ago

此处放入需要提取的文字,这个需要填什么,填写字体文件名,出现异常:

Exception in thread "main" java.lang.NullPointerException
        at com.google.typography.font.tools.sfnttool.GlyphCoverage.getGlyph(Unknown Source)
        at com.google.typography.font.tools.sfnttool.GlyphCoverage.touchGlyph(Unknown Source)
        at com.google.typography.font.tools.sfnttool.GlyphCoverage.getGlyphCoverage(Unknown Source)
        at com.google.typography.font.tools.sfnttool.SfntTool.subsetFontFile(Unknown Source)
        at com.google.typography.font.tools.sfnttool.SfntTool.main(Unknown Source)
forJrking commented 8 years ago

’此处放入需要提取的文字‘ = 仅仅需要提取的字体 例如 java -jar sfnttool.jar -s '一二三四' font.ttf fontc.ttf 这样的得到的fontc.ttf中仅仅包含 '一二三四' 这几个美工字体。

jp1017 commented 8 years ago

这样啊,也就是说压缩包仅仅包含这几个提取文字咯?

如果是很大的思源字体等,如果全部压缩的话,要如何处理下?

forJrking commented 8 years ago

如果全部使用建议还是保留原包为好,如果要做apk瘦身,我觉得可以使用zip压缩字体文件,在引导界面时候启用线程解压文件,这样变相的让apk下载包会变小

jp1017 commented 8 years ago

想法很棒,

其实这个也是蛮实用的,只用几个文字的需求也是很多的,感谢感谢! :+1: