code wiki / _hdl_build / nx_nishi_font_gate.nx

nx_nishi_font_gate.nx

buildroot/runtime/_hdl_build/nx_nishi_font_gate.nx

3483 B65 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic nishi
docsdependenciesstructsconstsfunctions

about

nx_nishi_font_gate.nx -- VERDICT gate for the sovereign Nishi stroke font. Renders glyphs to a white RGB buffer and asserts: (1) ink is drawn (black px present); (2) it is ANTI-ALIASED (gray edge px present, not just hard black/white); (3) glyph SHAPE is correct -- an 'H' has a WHITE gap in the top-center (between the two verticals, above the crossbar), proving strokes are placed (not a filled blob); (4) space renders BLANK. LIAR-KILL: the white-gap + blank-space assertions reject a draw-everywhere bug. 100% sovereign. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_png_write.nx nx_nishi_font.nx nx_nishi_font_gate.nx

imports: nx_syscalls.nxnx_png_write.nxnx_nishi_font.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap g_w sys_write nf_render_glyph sys_mmap ↻ nf_glyph nf_us nf_seg nf_stamp nf_u count_gray pn sys_mmap ↻ sys_write ↻ chk g_w ↻ sys_exit

structs

none

consts

none

functions

11func g_w(s: *u8) -> i64 { var k: i64=0; while s[k]!=(0 as u8){k=k+1} sys_write(1,s,k); return 0 }
called by 2: chkmain calls 1: sys_write
12func pn(v0: i64) -> i64 { var v: i64=v0; if v<0 { let m: *u8=sys_mmap(8); m[0]=45 as u8; sys_write(1,m,1); v=0-v } let b: *u8=sys_mmap(24); var k: i64=0; if v==0 {b[0]=48;k=1} while v>0 {b[k]=(48+(v%10)) as u8; v=v/10; k=k+1} let o: *u8=sys_mmap(24); var j: i64=0; while j<k {o[j]=b[k-1-j];j=j+1} sys_write(1,o,k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
14func count_gray(rgb: *u8, iw: i64, x0: i64, y0: i64, x1: i64, y1: i64, lo: i64, hi: i64) -> i64
called by 1: main
28func chk(cond: i64, label: *u8, pass: *i64) -> i64
called by 1: main calls 1: g_w
34func main() -> i64