0
4

1 回答 1

1

FontForge 有一个 Python 接口。http://fontforge.org/python.html

字形对象具有 和 之类的export方法importOutlines。我的代码未经测试,但阅读 FontForge 文档,导出应该是这样的:

import fontforge
f = fontforge.open("SomeChineeseFont.ext")

# Not sure if this is the right way to select all glyphs. But you'll get there.
for i in f.selection.select.all(): 
    f[i].export("%s.svg" %i)

现在经过数周的 SVG 编辑(也可以自动化)。是时候导入了:

import fontforge
f = fontforge.open("SomeChineeseFont.ext") # Use the orginal font as base

for i in f.selection.select.all(): 
    # Delete the original glyph or make sure your SVG 
    # only contains the contours you want to add.
    f.clear() 
    f[i].importOutlines("%s.svg" %i)

f.save("SomeRubyLikeChineeseFont.ext")

这就是你要找的东西吗?

于 2013-09-19T15:48:55.367 回答