将 png meme/icon 添加到现有的真实类型或开放类型字体

问题描述

我想向现有字体添加一个 png 图标,以便在 macOS 上的终端中使用。我已经研究过使用 python fonttools 包,但我不知道如何将 png 添加到字体中。听起来我需要修改/添加 sbix 表,但我正在努力寻找发生这种情况的示例。这可能吗?

解决方法

您可以使用 ttx(来自 fonttools 的别名)来提取和打包您的字体。

ttx -z extfile YourFont

文档:https://fonttools.readthedocs.io/en/latest/ttx.html