Kernagic is a semi-automatic tool for spacing fonts. It provides ways to interactively preview global and local changes to the glyphs in a UFO font - these changes can act as a starting point for further manual fine tuning.
The development began in Madrid at the Libre Graphics Meeting 2013, when Øyvind 'Pippin' Kolås (github.com/hodefoting email@example.com pippin.gimp.org) decided to hack around the automatic font spacing challenge. There, Dave Crossland introduced him to Frank Blokland's PhD research, published on the Letter Model website. The initial 'averaging' approach that Pippin explored (described in the Interactivos 13 Book) was later discarded, in favour of an approach of stem rhythm placement that deviates from Frank Blokland's theories.
To fit into a diverse set of workflows, Kernagic uses UFO fonts for input. UFO can act as a superset of other formats, and tools like Fontforge can be used for converting to and from it.
The snap gap method relies on automatically detected rhythm points, if the rhythm point detection works poorly with your font, or you want to override spacing decisions, you can insert your own rhythm points by clicking within the x-height of the glyph to change in the preview; rhythm point overrides are saved in the individual glyph files. Clicking below the x-height of a glyph removes custom overrides; clicking above it inserts a single rhythm point to be used for both left and right sides of the glyphs.
If metrics are determined, they can be saved back into the UFO (shifting the x co-ordinates of all points in all glyphs to change the left bearings, and setting a new advance width to set the right bearings.)
For help about the command line interface,
kernagic --help provides further
These are the various spacing methods implemented in Kernagic to date. The application is intended to be modular, so any programmer familiar with C and a minimum of GTK+ can explore their own methods, the internals of kernagic can express kerning but the currently implemented methods only produces metrics.
Show the original font, (included to be able to quickly switch between the original font and the resulting spacing, pressing F1, F2, F3, .. switches between the different methods.)
An additional option is available here to proportionally scale the existing bearings.
This methods permits specifying a desired gap between left and right rhythm points of glyphs. The bearings indicated by the gap is also snapped to grid in such a manner that the advance of the glyphs is a multiple of the snap value.
Provide a fitting that assumes your typeface is a traditional renaissance design, with classic glyph proportions.
This method encodes knowledge of glyph morphologies, found in Frank Blokland's excellent Letter Model. The bearings to use for each glyph; and how it relates to the shape of the glyph is encoded in a table. An internal table is provided that is used by default; this table is also provided with kernagic as a text file, using a text-editor the glyph morphology knowledge can be adapted and extended.
It is possible to compile Kernagic for Windows. TODO: Complete this
Mac OS X
Install XCode. Either with the App Store, or by registering as an Apple Developer and installing the appropriate XCode version from the Developer website (Select 'Developer Tools' and type 'Xcode' in the search box.)
Run Terminal and then type
brew install kernagic --HEAD;and hit enter
Run Terminal and then type
kernagicand hit enter
A video on how to use the program is at: TODO
kernagic --ipsumat is a way to run the ipsum generator stand-alone as a command line utility. Run
kernagic --ipsumat --help for more information.
Suggested workflow for snap gap method
1) set the snap to 0 2) adjust the gap until the type is as loose/tight as you want it 3) adjust snap, so that it is at a high value; where the type hasn't fallen totally apart 4) manually adjust remaining glyphs still in need of tuning.
Found a crash?
A shell script,
kernagic-debug-osx.sh, is included that allows you to produce backtraces conveniently on Mac OS X.