Building AAT kerning with a Kerning Input File
Options

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
- 46 Introductions
- 3.8K Typeface Design
- 476 Type Design Critiques
- 555 Type Design Software
- 1.1K Type Design Technique & Theory
- 640 Type Business
- 831 Font Technology
- 29 Punchcutting
- 508 Typography
- 120 Type Education
- 313 Type History
- 75 Type Resources
- 109 Lettering and Calligraphy
- 30 Lettering Critiques
- 79 Lettering Technique & Theory
- 533 Announcements
- 86 Events
- 110 Job Postings
- 167 Type Releases
- 169 Miscellaneous News
- 274 About TypeDrawers
- 53 TypeDrawers Announcements
- 119 Suggestions and Bug Reports