# The fonts on the desk

Six faces from terminals, workstations and home computers of the seventies,
eighties and early nineties. The two bitmap faces (Sun 12x22 and Fixed) were
converted here to outline web fonts pixel for pixel, by `tools/pixelfont.py`,
and tested against their source bitmaps by `tools/test.sh`. The rest are used
as their makers drew them, only split into web subsets by `tools/webfont.py`
(DSEG not even that). Rebuild everything with `tools/build.sh`.

| Face | From | Files | Licence |
| --- | --- | --- | --- |
| **Sun 12x22** | The console font of Sun Microsystems' workstations, 12 by 22 pixels, as the Linux kernel carries it (`font_sun12x22`) and kbd ships it: `sun12x22.psfu` from kbd 2.9.0 (Fedora's kbd-misc; byte for byte the file in [kbd's repository](https://github.com/legionus/kbd/tree/master/data/consolefonts), whose README.12x22 says "sun12x22.psfu was taken from the kernel source"). 256 glyphs in the CP437 order with a Unicode table. Details below. | `sun12x22-core.woff2` (the psfu and what is drawn here), `sun12x22-ext.woff2` (the rest, from Gallant), `sun12x22.ttf` | GPL-2.0-or-later, as kbd distributes it (the kernel's `font_sun12x22.c` is GPL-2.0): `src/sun12x22-COPYING.txt`. The characters drawn here are derived from it and under the same licence. The glyphs in the ext file are Gallant's: BSD-3-Clause, The Regents of the University of California (Jef Poskanzer), and BSD-2-Clause, Jens Schweikhardt: `src/gallant-LICENSE.txt`, `src/gallant-LICENSE.FreeBSD.txt` |
| **Fixed** | X11 misc-fixed, the xterm fonts (1987 on; ISO 10646 edition maintained by Markus Kuhn, ucs-fonts 2009-04; glyph for glyph the BDFs in his `ucs-fonts.tar.gz`). Cells 9×15 (text), 9×18 (large text), 6×13 (labels), 7×14 (large labels), for Type DEC and Commodore. | `fixed-*-core.woff2`, `fixed-*-ext.woff2` | Public domain: "Public domain font. Share and enjoy." `src/fixed-COPYING.txt` |
| **IBM 3270** | The IBM 3270 mainframe terminal (1971), by way of x3270 and Ricardo Bánffy's [3270font](https://github.com/rbanffy/3270font) 3.0.1, Semi-Condensed (byte for byte the release's `3270SemiCondensed-Regular.ttf`). | `ibm3270-core.woff2`, `ibm3270-ext.woff2` | BSD-3-Clause (and OFL-1.1 with no reserved name): `src/3270-LICENSE.txt` |
| **Glass TTY VT220** | The DEC VT220 terminal (1983), with its scan lines, by Viacheslav Slavinsky ([svofski/glasstty](https://github.com/svofski/glasstty), version 001.3). Crisp at 20px. | `vt220-core.woff2`, `vt220-ext.woff2` | Public domain (The Unlicense): `src/glasstty-LICENSE.txt` |
| **Sixtyfour** | The Commodore 64 (1982), by Jens Kutilek ([homecomputer-fonts](https://github.com/jenskutilek/homecomputer-fonts)), 2.001, as published in google/fonts; variable, with scan-line (SCAN) and bleed (BLED) axes. | `sixtyfour-core.woff2`, `sixtyfour-ext.woff2` | SIL Open Font License 1.1, no reserved name: `src/sixtyfour-OFL.txt` |
| **DSEG** | Seven- and fourteen-segment LED and LCD displays, by keshikan ([DSEG](https://github.com/keshikan/DSEG) 0.46), Classic Regular. | `DSEG7Classic-Regular.woff2`, `DSEG14Classic-Regular.woff2` (unmodified: the release's own files) | SIL Open Font License 1.1, reserved name "DSEG": `src/dseg-LICENSE.txt` |

`tools/` (the converters, `psf.py`, `sun_extra.py` and the tests) is MIT,
written for this site in 2026.

## Sun 12x22, in detail

The truth for this face is `src/sun12x22.psfu.gz` and the screenshot of it
in [Alexandre de Verteuil's gallery of Linux console
fonts](https://adeverteuil.github.io/linux-console-fonts-screenshots/)
(`src/sun12x22-reference.png`, `showconsolefont` on a Linux console). The
tests decode the psfu, draw its glyph table as that screenshot does, and get
the screenshot back to the pixel; then set the same page again in Chromium
with the web font, as text, and get it back to the pixel too.

- The cell is 12 by 22 with the baseline under row 15: ascent 16, descent 6.
  The em is the cell, so the face is crisp at 22px and 44px.
- The psfu's Unicode table is the standard CP437 one, but the kernel font
  draws four glyphs the other way round from CP437: 0x10 points left and
  0x11 right, 0x1A is a left arrow and 0x1B a right one. As the table stands,
  a page's → would show ←. `src/sun12x22-fixes.json` maps ▶ ► ◀ ◄ → ← to the
  glyph that shows them. The table also calls glyph 0x7F (a low double bar)
  ⌂ HOUSE; that mapping is dropped, so glyph 0x7F is not reachable from text.
  Glyphs 0x00 and 0xFF are blank and unmapped. Everything else is as the
  table says, including kbd's usual CP437 stand-ins (ß is β, Ø is Φ, ø is φ).
- What the psfu does not have and the site needs, or Latin-1 and ordinary
  punctuation would need, is in `src/sun12x22-extra.src`, written by
  `tools/sun_extra.py`, which says for every glyph where it came from. Most
  are put together from the psfu's own pixels: accented capitals from its
  shortened Ä, É, Ö, Ü and I bodies and its own accents; curly quotes from
  its ` ' and , (it draws them curly); dashes from its hyphen. Drawn here:
  × … ↗ ↖ ↘ ↙ ● ✓ ☆ ★ © ® € ™ ¤ ¹ ³ ⌂ and the combining comma above (with
  a ligature for n̓, as in mitsqanaqan̓). The two-cell cup ☕ is Gallant's.
  82 glyphs and one ligature in all; `sun12x22.json` lists them.
- Everything else (4,296 characters: Latin Extended, Greek, Cyrillic,
  symbols, more box drawing) is Gallant 1.002 (NanoBillion/gallant, Jens
  Schweikhardt's Unicode extension of the Sun PROM font), in the ext file,
  which a browser fetches only for a page that shows one of them. Gallant's
  letters sit on the same baseline; its box drawing and blocks keep their rows,
  so they join the psfu's. Gallant is a different edition of the same design:
  88 of the psfu's ASCII glyphs are the same shapes, but Gallant's baseline is
  a row lower and 155 of the 266 characters the psfu has are drawn
  differently (V, f, %, ~, (, ), {, }, _, the accented letters…), which is
  why the core is the psfu and not Gallant.

## Using the bitmap faces

Each converted face has its em set to the height of its character cell, so it
is exact at that size in CSS pixels and at every whole multiple: Sun 12x22 at
22 and 44px; Fixed 9×15 at 15px, 9×18 at 18px, 6×13 at 13px, 7×14 at 14px.
Give it `line-height` of a whole number of pixels (for Sun, 22 plus an even
number, so the baseline lands on a pixel), `letter-spacing` in whole pixels
(or none), no synthetic bold (`font-synthesis: none`), and put it on whole
pixels: no fractional rem or em spacing, no `fr` columns or centring that
splits a pixel (the stylesheet rounds these with `round()`). At other sizes
or positions it still works, but the pixels are resampled.

What the tests check (`tools/test.sh`):

- FreeType renders every glyph at 1×, 2× and 3× with no grey pixel, every
  pixel where the bitmap has one, and the right advance
  (`test_freetype.py`, against the psfu as `psf.py` reads it).
- Chromium draws every glyph the same way on a canvas and in DOM text, at
  device pixel ratios 1 and 2, and gives the font a line box of exactly one
  cell (`test_browser.mjs` with `test.html`, which reads the psfu, the
  supplement, Gallant and the BDFs with parsers of its own, not the Python
  that built the fonts).
- The reference screenshot, set again in Chromium with the web font, matches
  pixel for pixel at device pixel ratios 1 and 2 (`test_reference.mjs`).
- The site itself (`test_site.mjs`): at 1440×900, 1008×531 and 390×844, by
  day and by night, with every app open, nothing set in Sun 12x22 is drawn
  by any other font (Chromium's own account, DevTools
  `CSS.getPlatformFontsForNode`); every element in it is at 22 or 44px on
  whole pixels, and text side by side shares its baseline; and samples of
  the page's text, turned black on white where they stand, match the psfu's
  bitmaps at the places the browser put them.

Browsers that smooth text with LCD subpixels (Windows ClearType, some Linux
desktops) fringe every edge with colour; the shapes are still exact, and the
tests check that too. Scripts the browser shapes (Hebrew, Arabic, Thai…) are
checked in FreeType only.

## Source

Everything the faces here are built from is published beside them, so the
Sun 12x22 face (GPL-2.0-or-later) and the rest can be rebuilt and changed:
the source bitmaps and fonts with their licences in `src/`, the converter and
the tests in `tools/` (run `tools/build.sh`, then `tools/test.sh`), and each
build's report next to its web font (`sun12x22.json`, `sun12x22.ttf`, …).

- https://jaspermeller.com/fonts/src/3270-LICENSE.txt
- https://jaspermeller.com/fonts/src/3270SemiCondensed-Regular.ttf
- https://jaspermeller.com/fonts/src/6x13.bdf
- https://jaspermeller.com/fonts/src/7x14.bdf
- https://jaspermeller.com/fonts/src/9x15.bdf
- https://jaspermeller.com/fonts/src/9x18.bdf
- https://jaspermeller.com/fonts/src/Glass_TTY_VT220.ttf
- https://jaspermeller.com/fonts/src/Sixtyfour-VF.ttf
- https://jaspermeller.com/fonts/src/dseg-LICENSE.txt
- https://jaspermeller.com/fonts/src/fixed-COPYING.txt
- https://jaspermeller.com/fonts/src/fixed-meta.json
- https://jaspermeller.com/fonts/src/gallant-LICENSE.FreeBSD.txt
- https://jaspermeller.com/fonts/src/gallant-LICENSE.txt
- https://jaspermeller.com/fonts/src/gallant.src
- https://jaspermeller.com/fonts/src/glasstty-LICENSE.txt
- https://jaspermeller.com/fonts/src/sixtyfour-OFL.txt
- https://jaspermeller.com/fonts/src/sun12x22-COPYING.txt
- https://jaspermeller.com/fonts/src/sun12x22-README.txt
- https://jaspermeller.com/fonts/src/sun12x22-extra.src
- https://jaspermeller.com/fonts/src/sun12x22-fixes.json
- https://jaspermeller.com/fonts/src/sun12x22-meta.json
- https://jaspermeller.com/fonts/src/sun12x22-reference.png
- https://jaspermeller.com/fonts/src/sun12x22.psfu.gz
- https://jaspermeller.com/fonts/tools/build.sh
- https://jaspermeller.com/fonts/tools/fontface.py
- https://jaspermeller.com/fonts/tools/pixelfont.py
- https://jaspermeller.com/fonts/tools/psf.py
- https://jaspermeller.com/fonts/tools/sun_extra.py
- https://jaspermeller.com/fonts/tools/test.html
- https://jaspermeller.com/fonts/tools/test.sh
- https://jaspermeller.com/fonts/tools/test_browser.mjs
- https://jaspermeller.com/fonts/tools/test_freetype.py
- https://jaspermeller.com/fonts/tools/test_reference.mjs
- https://jaspermeller.com/fonts/tools/test_site.mjs
- https://jaspermeller.com/fonts/tools/webfont.py
