TypeFacet Autokern is a free and open source set of Python routines, created by Charles M Chen, that aims to let type designers automate much of the spacing and kerning processes. Typefacet info, git source, downloads etc is found here. Even though the project is an early work in process the results seem very positive. For example, below, screenshot of font in progress ‘Bench12′, before any spacing has been built, and then after running once through Typefacet.
At the moment Typefacet is producing the spacing in the screenshot above by adjusting side bearings, but also by creating lots of kerning pairs. Spacing a font by creating a huge amount of kerning pairs is not an ideal or elegant solution, however, by fine tuning the parameters that Typefacet uses, it is possible to use the tool in a much more targetted way.
For example, Typefacet can be run to only adjust side bearings, or, to only adjust kerning pairs, or both at the same time. The font weights in the screenshot below have been autospaced only by Typefacet, with kerning pairs to be added later.
This means spacing and kerning can be targetted separately. Additionally Tyefacet can be run to only adjust certain glyphs or pairs of glyphs, or to ignore whole categories of glyphs. This allows much fine tuning and the targetting of relevant pairs only. For example in the screenshots below, typefacet was run initially to target side bearings only (no kerning), then the relevant glyph pairs were targetted for kerning.
Typefacet can run with an array of arguments to vary the parameters for calculating side bearings and kerning amounts, so it is highly configurable and able to produce a very wide range of results. The most basic routines to calculate values set the minimum and maximum distances calculated (‘–min-distance-ems’ and ‘–max-distance-ems’). In addition Typefacet is able to tweak various aspects of it’s calculations making it a potentially powerful and flexible autospacer and autokerner. For example some other parameters used by Typefacet Autokern ;
‘–intrusion-tolerance-ems’ example defines the maximum amount to which the glyphs can “intrude” into the spacing between pairs
‘–kerning-threshold-ems’ discards kerning values less than this value.
‘–max-kerning-pairs’ only retains the N largest kerning values and discard the rest.
The full Typefacet Autokern manual can be found here.
For those interested, i’ve been testing on trying to get the amount of kerning pairs generated, way down, to anywhere between 200 – 1500 pairs, and still produce good spacing and kerning throughout a font. With that scenario i can see much better if the tool is able to produce good, functional, and practical results. Takes a lot of tweaking but i think i can see it does work, though i’m getting some results (a few kerned pairs) that are not what i would probably do manually, and i think i would manually tweak these later. So with simple sans-serifs (serif faces would likely respond differently) i’m getting best results with parameters like
--intrusion-tolerance-ems 0.0 --min-distance-ems 0.094 --max-distance-ems 0.095 --kerning-threshold-ems 0.0135 --max-x-extrema-overlap-ems 0.0 --precision-ems 0.0030
These parameters give the following results, which are still relying on too many kerning pairs, but progress is in the right direction.