gpt4 book ai didi

fonts - fontforge - 合并字体以添加字形的脚本

转载 作者:行者123 更新时间:2023-12-03 17:37:36 52 4
gpt4 key购买 nike

我有两个 .ttf 字体文件,其中一个包含我需要合并到另一个字体文件的字形。使用 GUI,会有一个对话框说

Do you want to retain kerning information from the selected font when one of the glyphs being kerned will come from the base font?



我需要为此选择否。生成合并字体时,会出现警告说该字体使用了非常规的 em 大小。生成的字体应该有 Missing points at extrema 之类的错误,没关系。

现在,这一切都是通过 GUI 完成的,我必须合并很多字体文件,所以我选择做脚本。
#!/usr/local/bin/fontforge
i = 2
while(i < $argc)
Open($1)
MergeFonts($argv[i])
MergeFeature($1)
Generate($argv[i])
i = i + 1
endloop

有了这个,我收到错误 MergeFeature: Failed to find kern info in file从而未能生成字体。有什么我想念的吗?

最佳答案

如果您不想包含字距调整信息,请删除以下行:

MergeFeature($1)

这最终会调用 LoadKerningDataFromMetricsFile由于字体文件不包含字距调整指标而失败。

根据 documentation :

This command will allow you to search for an adobe feature file (.fea) for feature/lookup information or an afm, ofm, tfm, pfm or mac resource file containing kerning pairs for the specified font. In many cases it will not be needed because when FontForge opens a .pfa or .pfb font it will automagically search for an appropriate .afm file in the same place.

关于fonts - fontforge - 合并字体以添加字形的脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45181895/

52 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com