Skip to content

28 CP437 glyphs in the 80x25 font differ from the IBM VGA ROM #2

@snaphat

Description

@snaphat

Summary

BlockZone is described in the README as a "faithful, pixel-perfect recreation of the original IBM VGA font." 228 of the 256 CP437 glyphs are byte-identical to the original ROM, but 28 glyphs differ. Of these, 25 are off by a single-pixel position shift (horizontal or vertical) and 3 are reshaped (0x7C |, 0xF1 ±, 0xFE ■).

This affects the font embedded in ansilove/ansilove (libansilove/src/fonts/font_pc_80x25.h) and in ansilove.js (FONT_PRESETS["80x25"]), both of which carry the same bitmaps and therefore the same deviations.

Reference used

The comparison reference is a font extracted from IBM hardware: spacerace/romfont, font-bin/IBM_VGA_8x16.bin (4096 bytes = 256 glyphs x 16 rows, 1 byte per row).

Supporting checks:

  • The 28 deviations appear identically in both the C font (font_pc_80x25.h) and the JS font (FONT_PRESETS["80x25"]), confirming the discrepancy is in the font data, not the renderer.

  • VileR's Ultimate Oldschool PC Font Pack (Bm437_IBM_VGA8) is byte-for-byte identical to the romfont dump (0 of 256 glyphs differ), giving an independent second source for the reference bitmaps.

  • The font was also compared against 7 distinct VGA-clone ROMs (Trident, 3dfx/Riva, Tseng, ATI, AVGA2, SeaBIOS, Vanta). The IBM VGA ROM is the closest match at 228/256; every clone scores lower. The 28 deviations do not correspond to any of these hardware fonts.

Question

Are these 28 glyphs intentionally redrawn (for example, re-centering narrow glyphs on the 9-wide cell, or deliberately filling the broken vertical bar), or are they unintended artifacts of recreating the font? The README's "pixel-perfect" claim implies the former is not intended. If a ROM-accurate font is the goal, the corrected bitmaps are included below.

Reshaped glyphs

Three glyphs are not simple position shifts:

0x7C | (vertical bar). The ROM glyph is a broken bar with a gap mid-height; BlockZone renders it solid:

      blockzone    ibm vga rom
  .........   .........    
  .........   .........    
  ...##....   ...##....    
  ...##....   ...##....    
  ...##....   ...##....    
  ...##....   ...##....    
  ...##....   .........   <
  ...##....   ...##....    
  ...##....   ...##....    
  ...##....   ...##....    
  ...##....   ...##....    
  ...##....   ...##....    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    

0xF1 ± (plus-minus). The ROM bottom rule spans the full 8-px cell width; BlockZone's is 6 px:

      blockzone    ibm vga rom
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  ...##....   ...##....    
  ...##....   ...##....    
  .######..   .######..    
  ...##....   ...##....    
  ...##....   ...##....    
  .........   .........    
  .........   .........    
  .######..   ########.   <
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    

0xFE (filled square). The ROM glyph is 5 px wide; BlockZone's is 6 px:

      blockzone    ibm vga rom
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .######..   .#####...   <
  .######..   .#####...   <
  .######..   .#####...   <
  .######..   .#####...   <
  .######..   .#####...   <
  .######..   .#####...   <
  .######..   .#####...   <
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    

Full list of deviations

Code Char Name Pixels off Difference
0x60 ` grave accent 4 shifted down 1 row
0x66 f small f 24 shifted right 1 px
0x76 v small v 13 shifted right 1 px
0x7C | vertical bar 2 reshaped (see below)
0x7E ~ tilde 14 shifted down 1 row
0x80 Ç C with cedilla 16 body/cedilla repositioned
0x87 ç c with cedilla 37 shifted up 1 row
0x8F Å A with ring 7 ring + crossbar repositioned
0x90 É E with acute 21 accent + body repositioned
0x91 æ ae ligature 2 shifted right 1 px
0x9B ¢ cent sign 12 shifted right 1 px
0x9F ƒ florin 12 descender repositioned
0xA6 ª feminine ordinal 26 shifted down 1 row
0xA7 º masculine ordinal 22 shifted down 1 row
0xAB ½ one half 9 numerator shifted right 1 px
0xAC ¼ one quarter 11 numerator shifted right 1 px
0xE3 π pi 10 shifted down 1 row
0xE4 Σ sigma 18 shifted down 1 row
0xE6 µ mu 18 shifted down 1 row
0xE8 Φ phi 16 shifted down 1 row
0xE9 Θ theta 16 shifted down 1 row
0xF1 ± plus-minus 2 reshaped (see below)
0xF5 integral bottom 8 shifted down 1 row
0xF6 ÷ division sign 4 dots repositioned
0xFA · middle dot 4 shifted up 1 row
0xFC superscript n 24 shifted right 1 px
0xFD ² superscript 2 26 shifted right 1 px
0xFE filled square 7 reshaped (see below)

All 228 remaining glyphs, including every box-drawing, block, and shading character, are identical to the ROM.

Side-by-side bitmaps for all 28 glyphs

# = pixel on, . = pixel off. Left column is BlockZone (9 px wide as stored), right column is the IBM VGA ROM. Differing rows are marked <.

0x60 ` grave accent (4 px, shifted down 1 row)

      blockzone    ibm vga rom
  .........   ..##.....   <
  ..##.....   ..##.....    
  ...##....   ...##....    
  ....##...   .........   <
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    

0x66 f small f (24 px, shifted right 1 px)

      blockzone    ibm vga rom
  .........   .........    
  .........   .........    
  ...###...   ..###....   <
  ..##.##..   .##.##...   <
  ..##..#..   .##..#...   <
  ..##.....   .##......   <
  .####....   ####.....   <
  ..##.....   .##......   <
  ..##.....   .##......   <
  ..##.....   .##......   <
  ..##.....   .##......   <
  .####....   ####.....   <
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    

0x76 v small v (13 px, shifted right 1 px)

      blockzone    ibm vga rom
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  ##...##..   .##..##..   <
  ##...##..   .##..##..   <
  ##...##..   .##..##..   <
  ##...##..   .##..##..   <
  ##...##..   .##..##..   <
  .##.##...   ..####...   <
  ..###....   ...##....   <
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    

0x7C | vertical bar (2 px, reshaped (see below))

      blockzone    ibm vga rom
  .........   .........    
  .........   .........    
  ...##....   ...##....    
  ...##....   ...##....    
  ...##....   ...##....    
  ...##....   ...##....    
  ...##....   .........   <
  ...##....   ...##....    
  ...##....   ...##....    
  ...##....   ...##....    
  ...##....   ...##....    
  ...##....   ...##....    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    

0x7E ~ tilde (14 px, shifted down 1 row)

      blockzone    ibm vga rom
  .........   .........    
  .###.##..   .........   <
  ##.###...   .###.##..   <
  .........   ##.###...   <
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    

0x80 Ç C with cedilla (16 px, body/cedilla repositioned)

      blockzone    ibm vga rom
  .........   .........    
  .........   .........    
  ..####...   ..####...    
  .##..##..   .##..##..    
  ##....#..   ##....#..    
  ##.......   ##.......    
  ##.......   ##.......    
  ##.......   ##.......    
  ##.......   ##....#..   <
  ##....#..   .##..##..   <
  .##..##..   ..####...   <
  ..####...   ....##...   <
  ...##....   .....##..   <
  .###.....   .#####...   <
  .........   .........    
  .........   .........    

0x87 ç c with cedilla (37 px, shifted up 1 row)

      blockzone    ibm vga rom
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   ..####...   <
  .#####...   .##..##..   <
  ##...##..   .##......   <
  ##.......   .##......   <
  ##.......   .##..##..   <
  ##.......   ..####...   <
  ##...##..   ....##...   <
  .#####...   .....##..   <
  ...##....   ..####...   <
  .###.....   .........   <
  .........   .........    
  .........   .........    

0x8F Å A with ring (7 px, ring + crossbar repositioned)

      blockzone    ibm vga rom
  ..###....   ..###....    
  .##.##...   .##.##...    
  ..###....   ..###....    
  ...#.....   .........   <
  ..###....   ..###....    
  .##.##...   .##.##...    
  ##...##..   ##...##..    
  #######..   ##...##..   <
  ##...##..   #######..   <
  ##...##..   ##...##..    
  ##...##..   ##...##..    
  ##...##..   ##...##..    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    

0x90 É E with acute (21 px, accent + body repositioned)

      blockzone    ibm vga rom
  ....##...   ...##....   <
  ...##....   ..##.....   <
  .........   .##......   <
  #######..   .........   <
  .##..##..   #######..   <
  .##...#..   .##..##..   <
  .##.#....   .##......   <
  .####....   .#####...   <
  .##.#....   .##......   <
  .##...#..   .##......   <
  .##..##..   .##..##..    
  #######..   #######..    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    

0x91 æ ae ligature (2 px, shifted right 1 px)

      blockzone    ibm vga rom
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  ###.##...   ##..##...   <
  ..##.##..   .###.##..   <
  ..##.##..   ..##.##..    
  .######..   .######..    
  ##.##....   ##.##....    
  ##.##....   ##.##....    
  .##.###..   .##.###..    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    

0x9B ¢ cent sign (12 px, shifted right 1 px)

      blockzone    ibm vga rom
  .........   .........    
  ...##....   ...##....    
  ...##....   ...##....    
  .#####...   ..####...   <
  ##...##..   .##..##..   <
  ##.......   .##......   <
  ##.......   .##......   <
  ##.......   .##......   <
  ##...##..   .##..##..   <
  .#####...   ..####...   <
  ...##....   ...##....    
  ...##....   ...##....    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    

0x9F ƒ florin (12 px, descender repositioned)

      blockzone    ibm vga rom
  .........   .........    
  ....###..   ....###..    
  ...##.##.   ...##.##.    
  ...##....   ...##....    
  ...##....   ...##....    
  ...##....   ...##....    
  .######..   .######..    
  ...##....   ...##....    
  ...##....   ...##....    
  ...##....   ...##....    
  ##.##....   ...##....   <
  .###.....   ...##....   <
  .........   ##.##....   <
  .........   .###.....   <
  .........   .........    
  .........   .........    

0xA6 ª feminine ordinal (26 px, shifted down 1 row)

      blockzone    ibm vga rom
  .........   .........    
  .........   ..####...   <
  ..####...   .##.##...   <
  .##.##...   .##.##...    
  .##.##...   ..#####..   <
  ..#####..   .........   <
  .........   .######..   <
  .######..   .........   <
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    

0xA7 º masculine ordinal (22 px, shifted down 1 row)

      blockzone    ibm vga rom
  .........   .........    
  .........   ..###....   <
  ..###....   .##.##...   <
  .##.##...   .##.##...    
  .##.##...   ..###....   <
  ..###....   .........   <
  .........   .#####...   <
  .#####...   .........   <
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    

0xAB ½ one half (9 px, numerator shifted right 1 px)

      blockzone    ibm vga rom
  .........   .........    
  .##......   ##.......   <
  ###......   ##.......   <
  .##...#..   ##....#..   <
  .##..##..   ##...##..   <
  .##.##...   ##..##...   <
  ...##....   ...##....    
  ..##.....   ..##.....    
  .##......   .##......    
  ##.###...   ##.###...    
  #....##..   #....##..    
  ....##...   ....##...    
  ...##....   ...##....    
  ..#####..   ..#####..    
  .........   .........    
  .........   .........    

0xAC ¼ one quarter (11 px, numerator shifted right 1 px)

      blockzone    ibm vga rom
  .........   .........    
  .##......   ##.......   <
  ###......   ##.......   <
  .##...#..   ##....#..   <
  .##..##..   ##...##..   <
  .##.##...   ##..##...   <
  ...##....   ...##....    
  ..##.....   ..##.....    
  .##..##..   .##..##..    
  ##..###..   ##..###..    
  #..##.#..   #..####..   <
  ..######.   ..#####..   <
  .....##..   .....##..    
  .....##..   .....##..    
  .........   .........    
  .........   .........    

0xE3 π pi (10 px, shifted down 1 row)

      blockzone    ibm vga rom
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   #######..   <
  #######..   .##.##...   <
  .##.##...   .##.##...    
  .##.##...   .##.##...    
  .##.##...   .##.##...    
  .##.##...   .##.##...    
  .##.##...   .##.##...    
  .##.##...   .##.##...    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    

0xE4 Σ sigma (18 px, shifted down 1 row)

      blockzone    ibm vga rom
  .........   .........    
  .........   .........    
  #######..   .........   <
  ##...##..   #######..   <
  .##......   ##...##..   <
  ..##.....   .##......   <
  ...##....   ..##.....   <
  ...##....   ...##....    
  ..##.....   ..##.....    
  .##......   .##......    
  ##...##..   ##...##..    
  #######..   #######..    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    

0xE6 µ mu (18 px, shifted down 1 row)

      blockzone    ibm vga rom
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .##..##..   <
  .##..##..   .##..##..    
  .##..##..   .##..##..    
  .##..##..   .##..##..    
  .##..##..   .##..##..    
  .##..##..   .#####...   <
  .##..##..   .##......   <
  .#####...   .##......   <
  .##......   ##.......   <
  .##......   .........   <
  ##.......   .........   <
  .........   .........    

0xE8 Φ phi (16 px, shifted down 1 row)

      blockzone    ibm vga rom
  .........   .........    
  .........   .........    
  .######..   .........   <
  ...##....   .######..   <
  ..####...   ...##....   <
  .##..##..   ..####...   <
  .##..##..   .##..##..    
  .##..##..   .##..##..    
  .##..##..   .##..##..    
  ..####...   ..####...    
  ...##....   ...##....    
  .######..   .######..    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    

0xE9 Θ theta (16 px, shifted down 1 row)

      blockzone    ibm vga rom
  .........   .........    
  .........   .........    
  ..###....   .........   <
  .##.##...   ..###....   <
  ##...##..   .##.##...   <
  ##...##..   ##...##..    
  #######..   ##...##..   <
  ##...##..   #######..   <
  ##...##..   ##...##..    
  ##...##..   ##...##..    
  .##.##...   .##.##...    
  ..###....   ..###....    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    

0xF1 ± plus-minus (2 px, reshaped (see below))

      blockzone    ibm vga rom
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  ...##....   ...##....    
  ...##....   ...##....    
  .######..   .######..    
  ...##....   ...##....    
  ...##....   ...##....    
  .........   .........    
  .........   .........    
  .######..   ########.   <
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    

0xF5 ⌡ integral bottom (8 px, shifted down 1 row)

      blockzone    ibm vga rom
  ...##....   ...##....    
  ...##....   ...##....    
  ...##....   ...##....    
  ...##....   ...##....    
  ...##....   ...##....    
  ...##....   ...##....    
  ...##....   ...##....    
  ...##....   ...##....    
  ...##....   ##.##....   <
  ##.##....   ##.##....    
  ##.##....   ##.##....    
  ##.##....   .###.....   <
  .###.....   .........   <
  .........   .........    
  .........   .........    
  .........   .........    

0xF6 ÷ division sign (4 px, dots repositioned)

      blockzone    ibm vga rom
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   ...##....   <
  ...##....   ...##....    
  .........   .........    
  .######..   .######..    
  .........   .........    
  ...##....   ...##....    
  .........   ...##....   <
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    

0xFA · middle dot (4 px, shifted up 1 row)

      blockzone    ibm vga rom
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  ...##....   .........   <
  .........   ...##....   <
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    

0xFC ⁿ superscript n (24 px, shifted right 1 px)

      blockzone    ibm vga rom
  .........   .........    
  .##.##...   ##.##....   <
  ..##.##..   .##.##...   <
  ..##.##..   .##.##...   <
  ..##.##..   .##.##...   <
  ..##.##..   .##.##...   <
  ..##.##..   .##.##...   <
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    

0xFD ² superscript 2 (26 px, shifted right 1 px)

      blockzone    ibm vga rom
  .........   .........    
  ..####...   .###.....   <
  .##..##..   ##.##....   <
  ....##...   ..##.....   <
  ...##....   .##......   <
  ..##..#..   ##..#....   <
  .######..   #####....   <
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    

0xFE ■ filled square (7 px, reshaped (see below))

      blockzone    ibm vga rom
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .######..   .#####...   <
  .######..   .#####...   <
  .######..   .#####...   <
  .######..   .#####...   <
  .######..   .#####...   <
  .######..   .#####...   <
  .######..   .#####...   <
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    
  .........   .........    

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions