A Better Method To Insert Corrected Glyphs Into CIDFont Resources
As I detailed in the February 24, 2012 CJK Type Blog post, the "first one wins" principle is useful when employing the AFDKO mergeFonts tool for replacing one or more glyphs in CIDFont resources. This comes at the expense of changing the FDArray indexes, at least for the example that was used. I noted that this is not a particularly important issue, but I felt that some clarification was necessary, thus the topic of today's CJK Type Blog post.
What matters is the assignment of CIDs to FDArray elements (by name) and their associated hinting parameters and other attributes, and these are unchanged even if the FDArray index changes. When the "first one wins" principle is invoked, it means that two or more CIDFont resources include a glyph for the same CID, and the one that is used in the resulting CIDFont resource is the one that is first encountered, as specified by the order of the merge fonts on the command line. However, there are very useful command-line options that allow one to exclude (or include) CIDs so that the FDArray indexes can be preserved, if that is important to you.
In the previous post, I specified the following two steps for injecting the corrected glyphs into the original CIDFont resource:
% tx-t1 KozGoPr6N-Medium.otf cidfont.orig
% mergeFonts cidfont.ps cidfont-26+1200.ps cidfont.orig
There are two very useful command-line options available to the mergeFonts tool, "-g" and "-gx," which are inverses of each another. The first one is used to specify glyphs to beincludedfrom the first merge font, and the second one is used to specifiy glyphs to beexcludedfrom the first merge font. In the second command line above, "cidfont-26+1200.ps" represents the first merge font.
If we were to simply transpose the two merge fonts in the second command line, it would result in the corrected glyphs in "cidfont-26+1200.ps" being ignored, due to the "first one wins" principle. However, if we were to add the "-gx 26,1200" command-line option and argument, the "first one wins" principle no longer applies, at least for CIDs 26 and 1200. (CID+0 would be ignored, but that's okay, because every CIDFont resource must include this particular glyph.) Thus, the following altered form of the second command line would preserve the FDArray indexes of the original font:
% mergeFonts-gx 26,1200cidfont.pscidfont.orig cidfont-26+1200.ps
In other words, CID+26 would be assigned to FDArray index 12, and CID+1200 would be assigned to FDArray index 11, which are the FDArray index assignments of these CIDs in the original CIDFont resource ("cidfont.orig").
Lastly, I would like to go on record to state that the technique described in this post is better than that described in the previous post, in terms of the merge fonts order and invoking the "-gx" option.
游客ReviewFS Emeric字体：一款令人愉悦的新字体font article没看看有这款字体啊
我在这儿Review网页设计中的艺术字体设计与排版（1）font article很好 值得学习
游客Review免费商用中文字体有哪些？font article新蒂字体 授权使用： 无需备案免费使用的情况： 在个人电脑上安装、打印个人文档、个人网站、博客、微博配图 需要备案免费使用的情况： 设计有可能商用的稿件（在商用时购买商业授权）、用于免费提供给他人的印刷品（印量在500份以内，且无需获得印刷品行政许可）的情况、用作没有品牌冠名的公益广告、用作完全免费（不能含有收费项目）的软件及网络服务。 需要购买个人授权的情况： 个人网店的装饰、个体商...