用于将TTF / OTF字体转换为SVG的命令行工具 [英] Command-line tool for converting TTF/OTF fonts to SVG
本文介绍了用于将TTF / OTF字体转换为SVG的命令行工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人知道将TTF和OTF字体转换为SVG字体的命令行工具吗?
Does anyone know of a command-line tool that will convert both TTF and OTF fonts to SVG fonts?
推荐答案
可以使用fontforge或batik从命令行执行此操作。
You can use fontforge or batik to do this from the commandline.
使用fontforge(请参阅 scripting documentation ):
With fontforge (see scripting documentation):
#!/usr/bin/fontforge
Open($1)
Generate($1:r + ".svg")
将上述保存到 convert2svgfont.pe
文件,然后调用as:
Save the above to convert2svgfont.pe
file, then invoke as:
convert2svgfont.pe myfont.ttf
对于蜡染,请参阅此文档,安装并调用as:
For batik see this documentation, install and then invoke as:
java -jar batik-ttf2svg.jar myfont.ttf -o myfont.svg
这篇关于用于将TTF / OTF字体转换为SVG的命令行工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文