scruss / HeathkitH19Font

an attempt to create an outline font of the Heathkit H19 terminal font

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HeathkitH19Font

an attempt to create an outline font of the Heathkit H19 terminal font, after crt monitor - ZenithZ89 System Font - Retrocomputing Stack Exchange

Process

From the ROM file 2716_444-29_h19font.bin extracted from h19.zip at MAME Heathkit H89 Emulator it is fairly clear that 128 characters are encoded as blocks of 10 bytes out of every 16:

00000000: 1818 1818 1818 1818 1818 0000 0000 0000  ................ # char 0x00
00000010: 0000 0000 ffff 0000 0000 0000 0000 0000  ................ # char 0x01
00000020: 1818 1818 ffff 1818 1818 0000 0000 0000  ................ # char 0x02
 ...
00000200: 0000 0000 0000 0000 0000 0000 0000 0000  ................ # char 0x20, SPACE
00000210: 0008 0808 0808 0008 0000 0000 0000 0000  ................ # char 0x21, EXCLAMATION MARK
 ...
000007f0: 0000 1c3e 3e3e 1c00 0000 0000 0000 0000  ...>>>.......... # char 0x7f

The first 32 characters are graphic characters, and don't correspond to any currently used encoding.

The character data can be extracted and joined as contiguous data using:

for i in {0..127}
do
  dd if=2716_444-29_h19font.bin bs=1 skip="$((i * 16))" count=10 of="$(printf 'h19-%02x.bin' ${i})" status=none
done
cat h19-*.bin > raw-h19.bin

John Elliott's PSF Tools can be used to convert this raw binary file into slightly more useful standard bitmap font files:

raw2psf --height=10 --width=8 --first=0 --last=127 raw-h19.bin h19.psf
psf2bdf --first=0 --last=127 --fontname=HeathkitH19 --descent=2 --defchar=9 h19.psf HeathkitH19.bdf

Note that the Bitmap Distribution Format (BDF) file created is effectively un-encoded. It does, however, contain all of the bitmap characters.

bdf2sfd did the heavy lifting of converting from a bitmap to an initial traced outline:

bdf2sfd -f 'Heathkit-H19 Regular' HeathkitH19.bdf > Heathkit-H19-Regular.sfd

Re-encoding

The non-ASCII characters were re-encoded using FontForge like so:

U+00B1	±	PLUS-MINUS SIGN
U+00B6	¶	PILCROW SIGN
U+00F7	÷	DIVISION SIGN
U+2022	•	BULLET
U+2192	→	RIGHTWARDS ARROW
U+2193	↓	DOWNWARDS ARROW
U+2501	━	BOX DRAWINGS HEAVY HORIZONTAL
U+2503	┃	BOX DRAWINGS HEAVY VERTICAL
U+250F	┏	BOX DRAWINGS HEAVY DOWN AND RIGHT
U+2513	┓	BOX DRAWINGS HEAVY DOWN AND LEFT
U+2517	┗	BOX DRAWINGS HEAVY UP AND RIGHT
U+251B	┛	BOX DRAWINGS HEAVY UP AND LEFT
U+2523	┣	BOX DRAWINGS HEAVY VERTICAL AND RIGHT
U+252B	┫	BOX DRAWINGS HEAVY VERTICAL AND LEFT
U+2533	┳	BOX DRAWINGS HEAVY DOWN AND HORIZONTAL
U+253B	┻	BOX DRAWINGS HEAVY UP AND HORIZONTAL
U+254B	╋	BOX DRAWINGS HEAVY VERTICAL AND HORIZONTAL
U+2571	╱	BOX DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT
U+2572	╲	BOX DRAWINGS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT
U+2573	╳	BOX DRAWINGS LIGHT DIAGONAL CROSS
U+2580	▀	UPPER HALF BLOCK
U+2582	▂	LOWER ONE QUARTER BLOCK
U+258E	▎	LEFT ONE QUARTER BLOCK
U+2590	▐	RIGHT HALF BLOCK
U+2592	▒	MEDIUM SHADE
U+2596	▖	QUADRANT LOWER LEFT
U+2597	▗	QUADRANT LOWER RIGHT
U+2598	▘	QUADRANT UPPER LEFT
U+259D	▝	QUADRANT UPPER RIGHT
U+25E4	◤	BLACK UPPER LEFT TRIANGLE
U+25E5	◥	BLACK UPPER RIGHT TRIANGLE
U+1FB82	🮂	UPPER ONE QUARTER BLOCK
U+1FB87	🮇	RIGHT ONE QUARTER BLOCK

Note that the upper and lower quarter block mapping is not quite 100% accurate. The H19 font is 10 px high, but there is no ONE FIFTH BLOCK in Unicode (yet).

TBD

  • clean up the inevitable mess this process made.

Licence

Heathkit H19 Terminal Font by Stewart Russell is licensed under CC BY-SA 4.0

About

an attempt to create an outline font of the Heathkit H19 terminal font

License:Other