font.4th: TEXT entry point, UTF-8 string rendering (item 4.3.6f)
Punch list §25 item 4.3.6f complete. TEXT ( c-addr u x y size color -- ) walks a UTF-8 byte string, decoding one codepoint at a time via DECODE-UTF8, drawing each via DRAW-GLYPH, and accumulating the cursor X by the glyph's em-advance scaled to pixels. Uses 2>R/2R> to stash the DECODE-UTF8 remainder off the data stack while DRAW-GLYPH's args are pushed. Defined in font.4th, not fabric.4th, so its compiled DRAW-GLYPH call binds to the real definition, not fabric.4th's 4.3.6b placeholder -- same early-binding constraint as DISPATCH-GLYPH itself. Verified live: a string mixing ASCII, Latin-1 (degree sign), and General Punctuation (em dash) renders correctly in one TEXT call with proportional spacing, no overlap. 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
aee09cac0a
commit
2960989100
Binary file not shown.
Reference in New Issue
Block a user