Recreating CRT Fonts

Original author: Norbert Landsteiner
  • Transfer
Learning Glyphs on the DEC VT100 and VT220 Terminals

Recently, I got a little addicted to emulating analog media: I wanted to recreate the bitmap graphics of CRTs, like on the “glass terminals” of the past, such as the iconic VT series from Digital Equipment Corporation (DEC). In the process, a number of questions arose about the features of font display in CRT pixel graphics. I wonder how the fonts actually looked and whether it is possible to reconstruct them according to the specifications?


Modern TrueType fonts recreate VT220 glyphs. Keep in mind that VT terminals supported two resolution modes: one for 132 characters per line and one for 80 characters (char-matrix 9 × 10 and 10 × 10, respectively), in the latter the interval is extended by one pixel

due to the abundance of technical information on sites like vt100.net andbitsavers.org can easily determine the appearance of those fonts. For example, we can restore glyphs from terminal firmware. There are even TrueType fonts that repeat VT220 typography: Glass TTY VT220 with raster lines and DEC Terminal Modern with modern, smooth outlines (in the illustration above).

Upon closer inspection, these fonts are significantly different from each other, but none of them look right. Comparing with photographs of the real VT100, the differences are noticeable not only in the font density, but also in the size and shape of the outlines and in the general “feel” of the font. However, terminal photos also cannot convey the real feeling of font density, because it strongly depends on the shooting parameters:


Adventure game Colossal CavePhoto on the screen of VT100. Photo: Wikipedia, Dave Fisher , 2008, Wikimedia Commons (edited, NL).


Display the directory list on the VT100. Photo: Jason Scott , 2013. Creative Commons (edited, NL).

Since the photos are not very helpful, it's time to take a look at the firmware.

Firmware


There are copies of the ROM, you can just extract real fonts from there that will perfectly match the original, right? .. What could go wrong?


The contents of the ROM from the terminals VT100 (left) and VT220 (right). The VT200 partition was performed by Paul Flo Williams, vt100.net (2008). VT100 supplemented by me, N. L.). The characters 'a', 'c', 'g', '2', '6', '7', '9', '@', '%', '{', '}', '|' , '°' and the form of control characters (␉ ␍ ␊ ␤ ␋). In addition, VT220 has more characters

This also looks wrong. Obviously, glyphs stretch vertically to approximately double height, but this is not the only distortion. Characters just don't look right. For example, look at 'p' and 'q' or the dots of the downstream right stroke of 'k', not to mention the funny outlines of '6' and '9' on the VT100 or distorted '2'! Moreover, upon closer inspection, the character matrix is ​​only 8 × 10, while we expected at least 9 × 10 (and 10 × 10 for a mode with 80 columns), as described in the specifications. This is clearly not what is displayed on the screen.

Phosphorus


Let's take another look at the manuals, in particular the VT100 Series Technical Manual (2nd edition, EK-VT100-TM-002; DEC, Maynard, Massachsetts, 1979). It states that the matter is in phosphor (phosphorus) delay:


Pulse duration and phosphorus activation profile for VT100 and VT200 (VT100 Series Technical Manual, EK-VT100-TM-002, p. 4-78). Keep in mind that signal pulse profiles are highly idealized and in analogue reality they are also inclined

The time of full activation of the phosphor is actually longer than the pulse duration for one pixel (40 nanoseconds). This means that if we try to display only one pixel, the phosphor at this particular location will never reach its full activation level, which will lead to a blurry image of different brightness between the duller, thinner sections and the denser, thicker ones. Therefore, typography is forced to adjust, giving out pulses of double duration (80 ns) to provide a clear image and legible text.


Single and double duration pulses and phosphor activation (from there, edited by NL)

Point Stretch Pattern


For this, VT terminals use a special dot stretching method: individual rows of the character matrix from the ROM are modified on the fly, extending any impulses of the active pixel by one more pixel. Where there is one pixel in the ROM, there will be two on the screen. Where two in a row, three are displayed.

Thus, our 8 × 10 matrix expands to the expected 9 × 10 (or 10 × 10 in 80 column mode, where the last pixel for drawing lines is stretched by another impulse).


Stretch points in VT100 and VT200 (VT100 Series Technical Manual, EK-VT100-TM-002, p. 4-78)

However, this will produce different results for characters of normal size and double width! Thanks to the wonders of stretching points, one font contains two fonts, each of which depends on the size of the screen!


  1. Like in ROM
  2. Single dot stretch width
  3. Double Width with Dot Stretch
  4. Single width with dot stretching and delay (phosphor)
  5. Double width with dot stretching and delay (phosphor)

(1, 2, 3 according to Paul Flo Williams, vt100.net , 4 and 5 added by me, NL)


It is crucial that the image (2) gives dotted lines that differ from the clear lines in modern font reconstructions. But if we add sinusoidal and cosine-like graphs of phosphor activation (Figs. 4 and 5, as well as a diagram with an activation graph above), we get a more accurate version of the actual display on the screen (remember that VT100 and VT220 show quite noticeable raster lines).


VT220 character patterns (80 column mode).

  1. Like in ROM
  2. Single dot stretch width
  3. Phosphor activation graphics added
  4. Added phosphor glow

(1 and 23 according to Paul Flo Williams, vt100.net , 3, 4 and negative added by me, N. L.)

There is a rather extreme example of how the media dictates the appearance of the typographic form, or, on the other hand, how the design of glyphs is created taking into account the medium and its specific technological limitations to achieve the desired typography. Looking at the phosphor activation effects, delay and glow, it becomes clear why different photographs of the screens of VT terminals show different font widths, depending on the shutter speed on the camera, while the overall smoothness of the font is preserved.

Here is another representation of the fonts in the ROM using the described effects, which are better similar to the actual screen image:


Visible glyphs VT100 (left) and VT220 (right)

The VT100 double-wide characters are shown below compared to the normal single-wide characters (black on white, and also in negative, as they are perceived from the screen):



Pictures from the workbench


And finally, two images from my working “workbench”, on which I try to recreate the analog terminal screen in a web browser using HTML5 and the canvas API. Maybe a bit retro blur, but you got the idea:


VT100 emulation (screenshot)


VT220 emulation (screenshot)

And that's all for today ...

Also popular now: