Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
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.