AFDKO “features” File Tips & Tricks, Part 2: GSUB Features for Public ROSes

When developing CID-keyed OpenType/CFF fonts that are based on one of our public ROSes—meaning Adobe-GB1-5, Adobe-CNS1-6, Adobe-Japan1-6, or Adobe-Korea1-2 (including their earlier Supplements)—it is a good idea to leverage existing resources. One of these resources are the registered GSUB (Glyph SUBstitution) features that we define when building OpenType/CFF fonts that are based on these ROSes. Of course, if you build an OpenType/CFF font based on the special-purpose Adobe-Identity-0 ROS, you’re pretty much on your own in terms of defining its GSUB features, but this CJK Type Blog post from earlier this month demonstrated how existing GSUB features for our public ROSes can be used as the basis for such fonts.

GSUB features are specified in the “features” file. Their order is important, because the order of the lookups in the resulting ‘GSUB’ table reflect the ordering in the “features” file, and applications and other clients are expected to respect the lookup order when applying two or more GSUB features. It is important that the aalt GSUB feature, if declared, is the very first one that is in the “features” file, and for these public ROSes, the vert and vrt2 GSUB features (including others that are invoked when in vertical writing mode) should be the very last ones. Click here to download an archive that includes the GSUB feature definition files that are referenced in this article. Note that each file includes appropriate “languagesystem” declarations at the beginning of the file.

Adobe-GB1-5 GSUB Features

The “ag15-gsub.txt” file includes definitions for the following nine GSUB features (in lookup order): aalt, dlig, fwid, hwid, nalt, pwid, trad, vert, and vrt2.

Note that these GSUB feature definitions can be used as-is for Supplement 4 and 5 fonts, because the highest CID that is referenced is CID+29063, which is in Adobe-GB1-4.

Adobe-CNS1-6 GSUB Features

The “ac16-gsub.txt” file includes definitions for the following 10 GSUB features: aalt, ccmp, dlig, fwid, hwid, nalt, pwid, liga, vert, and vrt2.

Note that these GSUB feature definitions can be used as-is for Supplement 3 through 6 fonts, because the highest CID that is referenced is CID+18832, which is in Adobe-CNS1-3.

Adobe-Japan1-3 GSUB Features

When building Adobe-Japan1-3 fonts, there are three basic glyph sets to consider. The most basic is Adobe-Japan1-3 proper (CIDs 0–9353), which is used to build fonts that use the “Std” identifier in their names. The “aj13-gsub.txt” file includes definitions for the following 14 GSUB features: aalt, dlig, expt, fwid, hwid, jp04, jp78, nlck, pwid, liga, trad, zero, vert, and vrt2.

When building JIS2004-savvy Adobe-Japan1-3 fonts, which use the “StdN” identifier in their names, an additional 144 glyphs outside the scope of Adobe-Japan1-3 (but still within Adobe-Japan1-6) should be included (CIDs 9354, 9779, 12101, 12870, 13320–13327, 13330, 13332–13333, 13335–13341, 13343, 13345–13355, 13358–13369, 13371, 13373–13382, 13385–13388, 13391–13400, 13402, 13460, 13495, 13538, 13624, 13650, 13673, 13731, 13803, 13860, 13893, 13915, 13949, 13964, 14013, 14066, 14074, 14111, 14116, 14196, 14272, 14290, 16977, 17041, 18760, 19312, 19346, 20175, 20222, 20263–20296, 20301–20305, 20307, 20314, and 21072–21074). The “aj13-gsub-jp04+144.txt” file includes definitions for the following 14 GSUB features: aalt, dlig, expt, fwid, hwid, jp78, jp90, nlck, pwid, liga, trad, zero, vert, and vrt2. Note that jp90 is included in lieu of jp04.

The third Adobe-Japan1-3–based glyph set to consider is a subset that is intended for building fonts that include glyphs only for (full-width) kana plus a small number of punctuation and symbols (CIDs 0–1, 232–233, 238–240, 243, 245–258, 262, 290, 292, 295, 326–331, 503–514, 633–642, 651–655, 659–661, 663, 665–666, 668, 670–679, 682–693, 695–697, 708–709, 711–719, 723–739, 780–789, 842–1010, 7612, 7887–7888, 7891–7892, 7894–7895, 7897, 7899–7904, 7907–7939, 7958–7960, 8009–8014, 8210, 8264–8265, 8268, 8273–8283, 8307, 8313–8316, 8720, 8951–8952, 8957–8959, 8962, 8964–8977, 8981, 9009, 9011, 9014, 9048, 9084–9089, and 9265–9275). The “aj13-kana-gsub.txt” file includes definitions for only the following five GSUB features: aalt, fwid, hwid, vert, and vrt2.

Adobe-Japan1-4 GSUB Features

When building Adobe-Japan1-4 fonts, there are two basic glyph sets to consider. The most basic is Adobe-Japan1-4 proper (CIDs 0–15443), which is used to build fonts that use the “Pro” identifier in their names. The “aj14-gsub.txt” file includes definitions for the following 31 GSUB features: aalt, afrc, ccmp, frac, numr, dnom, dlig, expt, fwid, hkna, hojo, hwid, jp04, jp78, jp83, nalt, nlck, pwid, ital, liga, qwid, ruby, subs, sinf, sups, trad, twid, zero, vert, vkna, and vrt2.

When building JIS2004-savvy Adobe-Japan1-4 fonts, which use the “ProN” identifier in their names, an additional 81 glyphs outside the scope of Adobe-Japan1-4 (but still within Adobe-Japan1-6) should be included (CIDs 16413, 16444–16449, 16467–16468, 16889, 16905, 16977, 17014, 17041, 17168, 17205, 18759–18760, 19061, 19312, 19346, 20175, 20222, 20263–20296, 20299–20310, 20312–20315, 21071–21074, 21558, 21933, 22010, and 22920). The “aj14-gsub-jp04+81.txt” file includes definitions for the following 31 GSUB features: aalt, afrc, ccmp, frac, numr, dnom, dlig, expt, fwid, hkna, hojo, hwid, jp78, jp83, jp90, nalt, nlck, pwid, ital, liga, qwid, ruby, subs, sinf, sups, trad, twid, zero, vert, vkna, and vrt2. Note that jp90 is included in lieu of jp04.

Adobe-Japan1-5 GSUB Features

When building Adobe-Japan1-5 fonts, there are two basic glyph sets to consider. The most basic is Adobe-Japan1-5 proper (CIDs 0–20316), which is used to build fonts that use the “Pr5” identifier in their names. The “aj15-gsub.txt” file includes definitions for the following 32 GSUB features: aalt, afrc, ccmp, frac, numr, dnom, dlig, expt, fwid, hkna, hojo, hwid, jp04, jp78, jp83, nalt, nlck, pkna, pwid, ital, liga, qwid, ruby, subs, sinf, sups, trad, twid, zero, vert, vkna, and vrt2. (The additional GSUB feature, when compared to Adobe-Japan1-4, is pkna.)

When building JIS2004-savvy Adobe-Japan1-5 fonts, which use the “Pr5N” identifier in their names, an additional ten glyphs outside the scope of Adobe-Japan1-5 (but still within Adobe-Japan1-6) should be included (CIDs 21071–21074, 21371, 21558, 21722, 21933, 22010, and 22920). The “aj15-gsub-jp04+10.txt” file includes definitions for the following 32 GSUB features: aalt, afrc, ccmp, frac, numr, dnom, dlig, expt, fwid, hkna, hojo, hwid, jp78, jp83, jp90, nalt, nlck, pkna, pwid, ital, liga, qwid, ruby, subs, sinf, sups, trad, twid, zero, vert, vkna, and vrt2. Note that jp90 is included in lieu of jp04.

Adobe-Japan1-6 GSUB Features

When building Adobe-Japan1-6 fonts, there is only one glyph set, specifically Adobe-Japan1-6 proper (CIDs 0–23057), which is used to build fonts that use the “Pr6” or “Pr6N” identifier in their names. The “aj16-gsub.txt” file includes definitions for the same set of 32 GSUB features as included in the “aj15-gsub.txt” file, but some of the features include additional substitutions that take advantage of the additional glyphs provided in Supplement 6.

When building JIS2004-savvy Adobe-Japan1-6 fonts, which use the “Pr6N” identifier in their names, the “aj16-gsub-jp04.txt” file, which includes definitions for the same set of 32 GSUB features as included in the “aj15-gsub-jp04+10.txt” file, should be used (though, like the “aj16-gsub.txt” file, some of the features include additional substitutions that take advantage of the additional glyphs provided in Supplement 6).

Adobe-Korea1-2 GSUB Features

The “ak12-gsub.txt” file includes definitions for the following 11 GSUB features: aalt, dlig, fwid, hngl, hwid, nalt, pwid, sinf, sups, vert, and vrt2.

The “ak12-hangul-gsub.txt” file, which is intended for use with Korean fonts that exclude the glyphs for the 4,620 hanja (CIDs 3436–8055) and thus included only CIDs 0–3435 and 8056–18351, is identical to the “ak12-gsub.txt,” but excludes the hngl GSUB feature.

Whew…

Comments are closed.