Skip to content

fix(render): glyph surgery so Spleen 5x8 K no longer reads as H - #127

Merged
teamchong merged 2 commits into
teamchong:mainfrom
dhruvraajeev:fix/glyph-surgery-k-vs-h
Jul 21, 2026
Merged

fix(render): glyph surgery so Spleen 5x8 K no longer reads as H#127
teamchong merged 2 commits into
teamchong:mainfrom
dhruvraajeev:fix/glyph-surgery-k-vs-h

Conversation

@dhruvraajeev

Copy link
Copy Markdown
Contributor

The stock Spleen K was H with one crossbar pixel removed (Hamming 1), the worst confusable pair in the atlas. Because the API downscales images and the model infers rather than scans, that difference vanishes and K is silently misread as H - with no signal of uncertainty.

gen-atlas.ts now repaints K with a diagonal-legged bitmap: Hamming 8 from H, and >=6 from every other ASCII glyph. Scoped to the narrow Spleen 5x8 primary cell, so the JetBrains-Mono and CJK-fallback atlases are untouched. Zero token-cost change - the glyph occupies the same 5x8 box.

Guarded by a regression test asserting no alphanumeric pair sits below Hamming 2. Reproduce with: npx tsx eval/glyph-matrix/demo-glyph.mts

Closes the "optional glyph surgery" item in the 2026-07-01 legibility audit.

dhruvraajeev and others added 2 commits July 20, 2026 01:39
The stock Spleen K was H with one crossbar pixel removed (Hamming 1), the
worst confusable pair in the atlas. Because the API downscales images and the
model infers rather than scans, that difference vanishes and K is silently
misread as H - with no signal of uncertainty.

gen-atlas.ts now repaints K with a diagonal-legged bitmap: Hamming 8 from H,
and >=6 from every other ASCII glyph. Scoped to the narrow Spleen 5x8 primary
cell, so the JetBrains-Mono and CJK-fallback atlases are untouched. Zero
token-cost change - the glyph occupies the same 5x8 box.

Guarded by a regression test asserting no alphanumeric pair sits below
Hamming 2. Reproduce with: npx tsx eval/glyph-matrix/demo-glyph.mts

Closes the "optional glyph surgery" item in the 2026-07-01 legibility audit.
Paired claude-fable-5 A/B (base b754d95 vs PR head ab063f2), 48 direct-API
reads of identical seeded fixtures: H/K per-char error 47.2% -> 18.7%,
K->H confusions 42 -> 1, McNemar exact p = 2.4e-07, no non-H/K regression.
Full write-up in FINDINGS.md (Update 2026-07-19).
@teamchong
teamchong force-pushed the fix/glyph-surgery-k-vs-h branch from a73ae29 to 105c542 Compare July 21, 2026 02:41

@teamchong teamchong left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @dhruvraajeev

@teamchong
teamchong merged commit 41f2ed1 into teamchong:main Jul 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants