deviation kerning - an experimental technique for monospace fonts
C Other
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
18
as
scribit
.gitignore
18.termkf
Makefile
README
as.termkf
bits.c
bits.h
edkern.c
ffing
fontify.c
kern.c
kern.h
kern_hack.h
kfa.c
kfa.h
king2
king_80x24
new_algo
pbm.c
pbm.h
plans
progress.c
scribit.termkf
termk.c
termk52-w.ti
termk52.ti

README

monokern: a project to create a kerned monospace font for terminals and code.

"Wait, did you say /kerned monospace/?"  Yes, I did - and that's not as ridiculous as it sounds.  The alignment of columnar and tabular text that monospace provides relies not on the spacing itself being constant, but of the sum of the spacing over longer runs being constant.  Thus, so long as a narrow pair-kerning is balanced out by a wide pair-kerning nearby, tables will remain aligned.
The basic idea behind monokern is /deviation kerning/: any individual character is permitted to deviate a fixed amount from its grid position.  In the initial experiments, this is 1px, because we're working with a small font just 6px wide.
kern.o performs the basic monokerning operation, using a dynamic-programming algorithm with linear-time performance.

To run a terminal that monokerns text: termk [shell] [shellargs]

termk's emulated terminal is based on a vt52, which is somewhat limited in its capabilities.
However, termk has several capabilities the vt52 does not, such as attributes (colours, boldface, reverse video) and function keys.  These are enabled if the appropriate terminfo entry is present; termk has its own terminfo record, which is installed to /usr/share/terminfo by [sudo] make install.  If the terminfo record is missing, termk will fall back to a standard vt52.
Also, termk does not currently have Unicode support.
Lastly note that termk gets the font (and kerning tables) from an archive 'as.termkf' which it expects to find in /usr/local/share/fonts; consequently, you need to [sudo] make install, first, or it won't run.
There is a second font, somewhat larger; to use it, run "termk -18 [shell] [shellargs]".  The -18 font has not been fully kerned or ligated yet.