user-font-demo.4th: prove the override mechanism (item 4.3.6e)
Punch list §25 item 4.3.6e complete. Optional capsule, not wired into the boot chain, overriding DISPATCH-UPPER's codepoint 65 (G-A) with a marked alternate glyph while every other letter falls through to font.4th's originals unchanged. Corrects §27.6.5: redefining the DISPATCH-* bucket word alone is not enough, since DISPATCH-GLYPH/DRAW-GLYPH are themselves compiled early against font.4th's own dispatch words (same early-binding finding as 4.3.6c, one layer up). Verified both ways: the partial override (bucket word only) left DRAW-GLYPH still drawing the original glyph; redefining DISPATCH-GLYPH/DRAW-GLYPH too made the override take effect. Three-arch acceptance boot clean, Stadium conservation unchanged. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
ef930ce04e
commit
aee09cac0a
@@ -4579,7 +4579,7 @@ document and committing that amendment as its own item.*
|
||||
> (`resident_sum=43691 reservoir=21845 sum=65536`): amd64 (`logs/20260809-202736`),
|
||||
> aarch64 (`logs/20260809-203103`), riscv64 (`logs/20260809-203156`).
|
||||
|
||||
- [ ] **4.3.6e — User font override.** Mechanism resolved 2026-08-09 (§27.6.5): override
|
||||
- [x] **4.3.6e — User font override.** Mechanism resolved 2026-08-09 (§27.6.5): override
|
||||
replaces a whole `DISPATCH-*` bucket word, not individual glyphs — `CASE`'s early binding
|
||||
means redefining a single glyph word (e.g. `G-A`) alone does not change what an
|
||||
already-compiled `DISPATCH-UPPER` calls, so the override capsule must redefine the entire
|
||||
@@ -4587,6 +4587,28 @@ document and committing that amendment as its own item.*
|
||||
`DISPATCH-*` bucket word (e.g. `DISPATCH-UPPER`), and after loading it, drawing a codepoint
|
||||
from that bucket renders the overridden glyph, not the default — verified live via
|
||||
screendump, both before and after the override loads. *Refs:* §27.6.5.
|
||||
> **Done 2026-08-09.** `capsules/user-font-demo.4th`, blocks 4200-4202. Not wired into
|
||||
> `init.4th` — an optional capsule loaded manually via `EXEC`, same as `doe.4th`.
|
||||
>
|
||||
> **§27.6.5 was incomplete, corrected here rather than silently followed.** The resolved
|
||||
> note said the override capsule must redefine the whole `DISPATCH-*` bucket word — true
|
||||
> but insufficient. `DISPATCH-GLYPH` and `DRAW-GLYPH` are themselves compiled early (in
|
||||
> `font.4th`, against `font.4th`'s own `DISPATCH-UPPER`) — the same finding already hit
|
||||
> once while building 4.3.6c's own dispatch wiring, applying again one layer up. Redefining
|
||||
> only `DISPATCH-UPPER` would not have been picked up; `user-font-demo.4th` redefines
|
||||
> `DISPATCH-UPPER` *and* `DISPATCH-GLYPH`/`DRAW-GLYPH` (blocks 4201-4202). Confirmed by
|
||||
> testing the incomplete version first — redefining `DISPATCH-UPPER` alone left `DRAW-GLYPH`
|
||||
> still drawing the original `G-A`, exactly as the early-binding rule predicts.
|
||||
>
|
||||
> Verified live, single boot, one screendump: codepoint 65 drawn via `DRAW-GLYPH` before
|
||||
> `S" user-font-demo.4th" EXEC` renders the plain default `A`; the same call after renders
|
||||
> `G-A-ALT` (the `A` with a diagonal cross through it), side by side in one image. All
|
||||
> other letters (`G-B`..`G-Z`) render unchanged, calling `font.4th`'s originals directly by
|
||||
> name — proving override granularity is per-bucket, not all-or-nothing across buckets.
|
||||
>
|
||||
> Three-architecture acceptance boot clean, Stadium conservation unchanged
|
||||
> (`resident_sum=43691 reservoir=21845 sum=65536`): amd64 (`logs/20260809-203815`),
|
||||
> aarch64 (`logs/20260809-203858`), riscv64 (`logs/20260809-203950`).
|
||||
|
||||
- [ ] **4.3.6f — `TEXT` entry point.** `TEXT ( c-addr u x y size color -- )`: decode UTF-8 via
|
||||
4.3.6a, dispatch each codepoint through 4.3.6b/`DRAW-GLYPH`, draw via its stroke word, scale
|
||||
|
||||
Reference in New Issue
Block a user