Building AAT kerning with a Kerning Input File
Grzegorz Rolek
Posts: 22
I’ve already posted this on Typophile but here it goes. I’m sure many of you have worked with Morph Input Files. Not so many, I suppose, with the so-called Kerning Input Files. One possible reason might be that the file format has never been actually released by Apple, and no apparent support exist in OS X Font Tools. I’ve heard the format itself was once mentioned in Apple’s docs, but it was all redacted afterwards.
I needed to build some state machine kerning for few of my projects, and I was tired of writing it in hex by hand, so I wrote a shell script that does exactly that. It reads an approximation of the mythical Kerning Input File and prints out hex data for a whole kerning table that can be fused into a font with Apple's tools as generic table data. The input syntax is based on the Morph Input File, and should be easy enough for people that ever worked with MIF itself.
There are two gotchas though. First, the script expects state machine kerning only. Dealing with other formats shouldn't be hard to implement, but it's not a priority for me. Second, the recently introduced extended kerning table (kerx) is not yet fully documented, so you get the old kern table for now. Still, this shouldn't be considered an issue, as the old table works well in CoreText on both OS X and iOS.
The script is called kiftohex and you can find it with all the details and sample code at https://github.com/grzegorzrolek/kiftohex/. Hope somebody will find it useful.
I needed to build some state machine kerning for few of my projects, and I was tired of writing it in hex by hand, so I wrote a shell script that does exactly that. It reads an approximation of the mythical Kerning Input File and prints out hex data for a whole kerning table that can be fused into a font with Apple's tools as generic table data. The input syntax is based on the Morph Input File, and should be easy enough for people that ever worked with MIF itself.
There are two gotchas though. First, the script expects state machine kerning only. Dealing with other formats shouldn't be hard to implement, but it's not a priority for me. Second, the recently introduced extended kerning table (kerx) is not yet fully documented, so you get the old kern table for now. Still, this shouldn't be considered an issue, as the old table works well in CoreText on both OS X and iOS.
The script is called kiftohex and you can find it with all the details and sample code at https://github.com/grzegorzrolek/kiftohex/. Hope somebody will find it useful.
0
Comments
-
I moved the whole thing to a new repo and made it build both
kerx
andankr
tables during the past year. It means you can work with both state machine-based kerning and the new control-point positioning as found in those tables.
This was before John Jenkins from Apple announced an upcoming update to their Font Tool Suite, a release that I assume will be pushing forward Apple’s new input format for building AAT, the Advanced Typography Input File, or ATIF, which is probably better-suited for the more common use cases. Nevertheless, when it comes to state machines with non-trivial state chains, I still find MIF, or for that matter KIF, often much easier to follow at a glance than ATIF.0
Categories
- All Categories
- 43 Introductions
- 3.7K Typeface Design
- 803 Font Technology
- 1K Technique and Theory
- 618 Type Business
- 444 Type Design Critiques
- 542 Type Design Software
- 30 Punchcutting
- 136 Lettering and Calligraphy
- 83 Technique and Theory
- 53 Lettering Critiques
- 483 Typography
- 301 History of Typography
- 114 Education
- 68 Resources
- 499 Announcements
- 80 Events
- 105 Job Postings
- 148 Type Releases
- 165 Miscellaneous News
- 270 About TypeDrawers
- 53 TypeDrawers Announcements
- 116 Suggestions and Bug Reports