code wiki / (root) / nx_font_web_embed.nx

nx_font_web_embed.nx

buildroot/runtime/nx_font_web_embed.nx

4999 B76 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic font
docsdependenciesstructsconstsfunctions

about

nx_font_web_embed.nx -- R3 of the sovereign-font ladder: read web_assets/nishi.ttf (from R2), base64-encode it, and emit web_assets/nishi_font_test.html with an @font-face data-URI (NO external load, fully sovereign) that renders text in OUR font -> the browser loads a typeface we built from scratch. Closes the distinctive-typeface axis end-to-end (R0 census -> R1 outline -> R2 .ttf -> R3 embed). Seed glyphs = H I T + space, so the demo word uses them. license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 0 importers

nx_syscalls_x86_64.nx nx_font_web_embed.nx

imports: nx_syscalls_x86_64.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main b64_encode b64c he_puts sys_openat_wr

structs

none

consts

7const K_MAGIC_65536: i64 = 65536
8const K_MAGIC_131072: i64 = 131072

functions

10func he_puts(buf: *u8, off: i64, s: *u8) -> i64 { var o: i64=off; var i: i64=0; while s[i]!=0 { buf[o]=s[i]; o=o+1; i=i+1 } return o }
called by 1: main
12func b64c(v: i64) -> i64
called by 1: b64_encode
20func b64_encode(inb: *u8, n: i64, out: *u8) -> i64
called by 1: main calls 1: b64c
48func main() -> i64