We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
如果你不介意 Python,
我建议你看看 FontForge 。它既可以构建为嵌入 Python 解释器,也可以作为 Python 中的 库 运行。另一个不错的功能是它的本机文件格式,样条字体数据库是ascii并且有很好的文档记录和用您自己的程序很容易操作。
我经验较少的另一个替代方案是 TTX 和 TTLib。后者是一个 Python 库,前者是它的包装器,可以在 TTF 和 XML 之间往返。
If you don't mind Python, there are a couple of good possibilities
I'd suggest having a look at FontForge. It can be built both to embed a Python interpreter, and to run as a library from within Python. Another nice feature is that its native file format, the spline font database is ascii and fairly well documented and quite easy to manipulate with your own programs.
Another alternative that I have less experience with is TTX and TTLib. The later is a Python library and the former is wrapper around it which roundtrips TTF to XML and back.
由于您对编程语言很灵活,因此您可以使用Fontforge,就像@Boojum所说,并且您将可以使用两个接口:它的母语(在手册中称为“遗留”接口)和一个非常详细的的Python接口。
Fontforge 可在许多 Linux 发行版中使用,包括 Debian 和 Ubuntu 等(免责声明:我是该团队的成员)在 Debian 中维护 fontforge,并且通过过渡在 Ubuntu 中维护 fontforge)。
它也适用于 Mac,也许还有 Windows,但我不确定它们是否可以作为现成的内置可执行文件使用。
好的,回到 Fontforge。
Fontforge 能够读取和写入多种格式的字体,并且其“本机”格式(称为 Spline 字体数据库)是一种纯文本格式,如果您仔细操作的话,很容易使用文本编辑器阅读和操作。
从编程方面,您可以看到一个非常基本的 Python 脚本,该脚本从样条字体数据库文件 (SFD) 创建 OpenType 字体,脚本列出于 https://github.com/rbrito/urw-garamond/blob/master/scripts/generate.py。但不用担心:读取 SFD 文件的方式(功能)与读取 TrueType、OpenType、Postscript 等字体的方式(功能)完全相同。
作为简单操作字体的另一个示例,您可以看到一个脚本,该脚本将一种字体作为输入并创建该字体的倾斜版本: https://github.com/rbrito/urw-garamond/blob/master/scripts/to-slant.py。
关于“可学习性”,您有很多项目可以使用它们的脚本,您可以通过它们的示例轻松学习。例如,DejaVu 项目 和 Barry Schwartz 的 sortsmill 脚本。
所以,只有你的创造力才是极限。
As you are flexible with regard to the programming language, you can use Fontforge, like @Boojum said, and you will have available to you two interfaces: both its native language (called in the manual the "legacy" interface) and a python interface that is very carefully detailed.
Fontforge is available in many Linux distributions, including Debian and Ubuntu, among others (disclaimer: I am a member of the team that maintains fontforge in Debian, and, by transition, in Ubuntu).
It is also available for Macs and, perhaps, Windows, but I'm not sure if they are available as ready, built executables.
OK, back to Fontforge.
Fontforge is able to read and write fonts in many formats, and, its "native" format (called Spline Font Database) is a plain-text format that is very easy to read and manipulate with a text editor, if you do that carefully.
From the programming side, you can see a very basic Python script that creates an OpenType font from a spline font database file (SFD) with the script listed at https://github.com/rbrito/urw-garamond/blob/master/scripts/generate.py. But fear not: the very same way (functions) that you use to read an SFD file is the way that you would read a TrueType, OpenType, Postscript etc. font.
As another example of a simple manipulation of fonts, you can see one script that takes a font as input and creates a slanted version of that font: https://github.com/rbrito/urw-garamond/blob/master/scripts/to-slant.py.
Regarding "learnability", you have plenty of projects that make their scripts available and you can easily learn by example from them. For example, the DejaVu project and Barry Schwartz's sortsmill scripts.
So, only your creativity is the limit.
该网站允许您添加 svg、编辑它们或包含更多内容,然后将其导出为字体、选择名称大小等。
https://icomoon.io/app/#/select/font
This website allows you to add your svg, edit them, or include more and then export it as a Font, choosing name size etc.
https://icomoon.io/app/#/select/font