As described in the August 24, 2012 article, I am currently updating most of our OpenType Japanese fonts. One aspect of the update is to include the 32 additional IVSes, based on the March 2, 2012 version of the IVD (Ideographic Variation Database), which means that all of the kanji in Adobe-Japan1-6 now have a "plain text" representation. Another aspect of this particular update is to use the latest UTF-32 CMap resources, which include three additional mappings, one of which is U+9FCC that was appended to the URO (Unified Repertoire & Ordering) in Unicode Version 6.1. But, the topic of this article is about fixing a small number of glyphs, and the techniques that I used to do so.
Using one of the six weights of Kozuka Gothic Pro (小塚ゴシック Pro) as example, I will describe the steps that I used to perform the update.
First, I prepared a small CID-keyed font that includes only the glyphs to be updated, along with the mandatory CID+0 (aka the ".notdef" glyph). With the output of the fdarray-check.pl and extract-cids.pl tools, you can see the extent of the updated glyphs, along with an FDArray structure that matches the parent font. As described in previous articles, controlling the FDArray structure is very important, and very easy to do once you understand the principles.
Below is the output of the fdarray-check.pl tool:
% fdarray-check.plHeavy.cid
NOTE: GIDs do not equal CIDs starting from GID+1/CID+3748!
Detected ROS: Adobe-Japan1-4
KozGoPr6N-Heavy-Kanji (0): /0,/3748,/14960,/15251,/15310(5)
Below is the output of the extract-cids.pl tool:
% extract-cids.pl-r-sHeavy.cid
/0,/3748,/14960,/15251,/15310
And, for good measure and to provide a visual, below is a glyph synopsis that was generated by the tx tool, using its "-pdf" command-line option:
Of course, the AFDKO mergeFonts tool was used to prepare this five-glyph CID-keyed font.
The following three command lines were used to insert the updated glyphs into the 15,444-glyph CID-keyed font (the output file of each command has been emboldened for easy identification), which includes rehinting the updated CID-keyed font:
% mv cidfont.pscidfont-orig.ps
% mergeFonts-gx /3748,/14960,/15251,/15310cidfont-new.pscidfont-orig.ps \
Heavy.cid
% autohint-r-q-ocidfont.pscidfont-new.ps
That's it.
Note how the output of the "extract-cids.pl-r-s" command line was used, without modification, as the argument of the mergeFonts "-gx" command-line option.
For those who plan to attend ATypI Hong Kong 2012 in October, the three-hour Manipulating CID-keyed fonts using AFDKO tools workshop will describe this and other techniques that involve CID-keyed font development.
Finally, speaking of AFDKO, we are almost ready to release a new version, so be sure to stay tuned to this blog, and to its sister blog, Typblography, for a release announcement.