Skip to content
Semi-automatic font spacing tool
C Makefile Shell
Find file
Failed to load latest commit information.
.mm build: re-order arguments to CC in build
tests update tests
.gitignore improve win32 build and docs
AUTHORS Initial import
LICENSE apply GPLv3+ to kernagic
Makefile update win32 build dependencies
README Update README with story, debug note
README.md Symlink README to README.md for gh display
bounds.c add original spacing mode
cadence.c table spacing: add support for tuning n-basis
frank-blokland-renaissance.txt renaissance table: set the correct n_basis (24)
gap.c use g_unichar_islower() instead of islower()
gimpspinscale.c Replace sliders with gimpspinscale
gimpspinscale.h Replace sliders with gimpspinscale
glyph.c apply GPLv3+ to kernagic
glyph.h remove unused field from Glyph
gray.c apply GPLv3+ to kernagic
ipsumat.c apply GPLv3+ to kernagic
kernagic-debug-osx.sh Rename debug files and docs
kernagic-debug-osx.txt Rename debug files and docs
kernagic.c ui: s/classic spacing/table based/ + table file monitoring
kernagic.h reuse override code paths for center glyphs
kernagic.nsis mingw32 build improvements
lib-plist.c apply GPLv3+ to kernagic
original.c enabled scale bearings option for original method
render.c apply GPLv3+ to kernagic
rythm.c apply GPLv3+ to kernagic
ufo-glyph-parser.c ignore non-existing glyphs from commandline
ui-gtk.c ui: s/classic spacing/table based/ + table file monitoring

README.md

Kernagic

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 pippin@gimp.org 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 documentation.

Spacing Methods

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.

Original

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.

Snap gap

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.

Classic proportions

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.

Installation

From Source

Windows

It is possible to compile Kernagic for Windows. TODO: Complete this

Mac OS X

  1. 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.)

  2. Install Homebrew

  3. Run Terminal and then type brew install kernagic --HEAD; and hit enter

  4. Run Terminal and then type kernagic and hit enter

Usage

A video on how to use the program is at: TODO

Running 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.

Something went wrong with that request. Please try again.