• 字体
  • 字体家族
  • 字体公司
  • 字体设计师
  • 字体样张
  • 资讯
  • 帮助
字客网>资讯>详情

CID vs GID (Cont'd)

时间:2012-04-12 13:22:33| 新闻|浏览:198|来源:Adobe Blogs|作者:Dr. Ken Lunde
导语In yesterday's CJK Type Blog post, I introduced and provided thre

In yesterday's CJK Type Blog post, I introduced and provided three Perl tools for listing the CIDs and GIDs in font resources: extract-cids.pl, extract-gids.pl, and mkrange.pl. In my continued effort to provide font developers with useful tools, I spent a few minutes this morning to enhance two of these tools, specifically extract-cids.pl and mkrange.pl.

First, the extract-cids.pl tool was changed so that it emits CIDs with a slash ("/") prefix, which matches what the "-g" command-line option of various AFDKO tools expect when explicitly specifying CIDs, as opposed to GIDs.

Second, the mkrange.pl tool was enhanced in two significantly ways. The first enhancement was to simply detect and properly handle the slash ("/") prefix, which is shown in the example command line and its output below:

% extract-cids.plcidfont.ps| mkrange.pl

/0-/8358

/8720-/9081

/9084-/9353

The second enhancement was to add a "-n" command-line option. By default, each CID or CID range (or GID or GID range, when the output of the extract-gids.pl tool is piped into this tool) is output on a separate line, as shown above. When the "-n" command-line option is invoked, each CID or CID range is separated by a comma, making the result ready to be used as the argument of the "-g" command-line option that is supported by various AFDKO tools. Below is an example command line and its output:

% extract-cids.plcidfont.ps| mkrange.pl-n

/0-/8358,/8720-/9081,/9084-/9353

The extract-gids.pl tool is unchanged.

These minor enhancements are useful for my own font development work, and I hope that others also find them to be useful.

0
  • 关注字客网公众号领取Z码
  • 关注字体先森公众号抽取SVIP
相关字体公司
CID vs GID (Cont'd) 网友点评
游客:文明上网,理性发言。 看不清?换一张
CID vs GID (Cont'd) 最新评论
暂无相关评论