Skip to content

Latest commit

 

History

History
63 lines (44 loc) · 3.33 KB

README.org

File metadata and controls

63 lines (44 loc) · 3.33 KB

This is a faithful recreation of the DEC VT220 fonts, in bitmap font format, using a VT220 rom dump and performing the same operations on the pixels as described in the VT220 technical manual. The only departure is that the bitmap is stretched 2x vertically since the vertical pixel density of the VT220 was about 1/2 it’s horizontal pixel density.

Fonts with 150 x resolution are double width and have been created by doubling the width before stretching as per the DEC manual

Additionally, I have added a few new characters based on the original characters, mostly related to the General Punctuation unicode block (U+2000 - U+206F) since they are encountered regularly when using a terminal based web browser. Bold/italic/bolditalic fonts (generated using mkbolditalic) are also included although they are anachronistic to

It includes both 80col and 136col fonts.

Installation

Fonts are provided at a variety of sizes in the dist/fonts folder. You should use otb/bdf for x11 applications and psf for tty (via setfont). I recommend using the 80col font.

Font Server

To install for most applications copy the bdf folder to somewhere that the font server will know about it (~/.local/share/fonts works in most cases) and reload the font server

git clone [email protected]:htayj/DEC-Fonts.git
cp DEC-Fonts/dist/fonts/bdf ~/.local/share/fonts/digital
fc-cache -fv

You may need to restart any running applications for the font to become an option

Xterm

For usage with xterm, additionally make sure you have fontscale and fontdir generated and add the fontpath

cd ~/.local/share/fonts/digital/
mkfontscale
mkfontdir
xset +fp ~/.local/share/fonts/digital/

You can then set your font in ~/.Xresources:

*VT100.font: -digital-vt220-medium-r-normal-80col-20-200-75-75-c-100-iso10646-1

And load the new config

xrdb ~/.Xresources

The font should work by default with xterm’s double width emulation (\e#6).

You can test if it is correct by running the included fonttest script and comparing to the screenshot below. The most noticeable difference is that double width p/q should have a small separation between the top of its stem and bowl (ie: the circle in the letter will appear slightly more circular and separated from the rest of the character. eg: the top of the character p will not be a continuous line but will instead by broken by 1 pixel in the 20px font)

Building

Run main.lisp using sbcl with quicklisp

to generate the otb and psf fonts, alongside bold/italic, run convert.bash ( bdf2psf required for the psf fonts and mkbolditalic required for bold/italic)

Screenshots

sample.png nethack_DECgraphics.png

Acknowledgements

Giant thank you to Paul Flo Williams for creating vt100.net, which provided the rom dump image (rom-separated.png) that is parsed to create the font along with the instructions on how the font is created

https://www.vt100.net/dec/vt220/glyphs

See Also