code wiki / (root) / nx_font_full.nx

nx_font_full.nx

buildroot/runtime/nx_font_full.nx

39776 B445 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic font
docsdependenciesstructsconstsfunctions

about

nx_font_full.nx -- the COMPLETE accessible sovereign typeface: space + digits 0-9 (SLASHED zero for 0/O disambiguation) + uppercase A-Z (redesigned: curved bowls, serifed I, lighter stroke) + lowercase a-z with a true X-HEIGHT (the biggest readability lever). Composed from the stroke toolkit + two new curve primitives: arch (n/m/h/r shoulders) and uarch (u), plus cshape/cshapeL (open C/G, digit bowls). One self-validated .ttf -> web_assets/nishi_sans.ttf + page. Grounded in the legibility research (Atkinson/x-height/dyslexia). license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 0 importers

nx_syscalls_x86_64.nx nx_font_full.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 gen add_rect gen_digit ellipse seg isqrt vbar add_rect ↻ hbar add_rect ↻ cshapeL gen_upper seg ↻ hbar ↻ vbar ↻ cshape ellipse ↻ uarch gen_lower ellipse ↻ vbar ↻ seg ↻ cshape ↻ hbar ↻ arch uarch ↻ gen_punct1 vbar ↻ add_rect ↻ hbar ↻ seg ↻ ellipse ↻ cshape ↻ cshapeL ↻ gen_punct2 add_rect ↻ seg ↻ hbar ↻ cshapeL ↻

structs

none

consts

8const MAGIC_MAGIC_65536: i64 = 65536
9const MAGIC_MAGIC_16777216: i64 = 16777216
10const MAGIC_MAGIC_4294967296: i64 = 4294967296
11const MAGIC_MAGIC_2048: i64 = 2048
12const MAGIC_MAGIC_131072: i64 = 131072
13const MAGIC_MAGIC_65535: i64 = 65535
14const MAGIC_MAGIC_65505: i64 = 65505
15const MAGIC_MAGIC_65490: i64 = 65490
16const MAGIC_MAGIC_65483: i64 = 65483
17const MAGIC_MAGIC_65531: i64 = 65531
18const MAGIC_MAGIC_65477: i64 = 65477
19const MAGIC_MAGIC_1594834165: i64 = 1594834165
20const MAGIC_MAGIC_1033: i64 = 1033
21const MAGIC_MAGIC_196608: i64 = 196608
22const MAGIC_MAGIC_262144: i64 = 262144
23const MAGIC_MAGIC_524288: i64 = 524288
25const MAGIC_ADJ: i64 = 2981146554
26const WR: i64 = 38
27const WH: i64 = 26

functions

29func sw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main
30func sn(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1} sys_write(1,bb,k); return 0 }
called by 1: main
31func si16(v: i64) -> i64 { if v<0 { return v+MAGIC_MAGIC_65536 } return v }
called by 2: append_glyphmain
32func w8(b: *u8, o: i64, v: i64) -> i64 { b[o]=(v%256) as u8; return o+1 }
called by 2: append_glyphmain
33func w16(b: *u8, o: i64, v: i64) -> i64 { b[o]=((v/256)%256) as u8; b[o+1]=(v%256) as u8; return o+2 }
called by 2: append_glyphmain
34func w32(b: *u8, o: i64, v: i64) -> i64 { b[o]=((v/MAGIC_MAGIC_16777216)%256) as u8; b[o+1]=((v/MAGIC_MAGIC_65536)%256) as u8; b[o+2]=((v/256)%256) as u8; b[o+3]=(v%256) as u8; return o+4 }
called by 1: main
35func r32(b: *u8, o: i64) -> i64 { return (b[o] as i64)*MAGIC_MAGIC_16777216 + (b[o+1] as i64)*MAGIC_MAGIC_65536 + (b[o+2] as i64)*256 + (b[o+3] as i64) }
called by 1: csum
36func align4(o: i64) -> i64 { while o%4 != 0 { o=o+1 } return o }
called by 1: main
37func csum(b: *u8, off: i64, len: i64) -> i64 { var s: i64=0; var i: i64=off; while i < off+len { s = (s + r32(b,i)) % MAGIC_MAGIC_4294967296; i=i+4 } return s }
called by 1: main calls 1: r32
38func 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
39func b64c(v: i64) -> i64 { if v<26 { return 65+v } if v<52 { return 97+(v-26) } if v<62 { return 48+(v-52) } if v==62 { return 43 } return 47 }
called by 1: b64_encode
40func b64_encode(inb: *u8, n: i64, out: *u8) -> i64
called by 1: main calls 1: b64c
49func isqrt(n: i64) -> i64 { if n<=0 { return 0 } var x: i64=n; var y: i64=(x+1)/2; while y<x { x=y; y=(x + n/x)/2 } return x }
called by 1: seg
50func add_rect(px: *i64, py: *i64, on: *i64, ep: *i64, pc: i64, cc: i64, x0: i64, y0: i64, x1: i64, y1: i64) -> i64
54func vbar(px: *i64, py: *i64, on: *i64, ep: *i64, pc: i64, cc: i64, xc: i64, y0: i64, y1: i64) -> i64 { return add_rect(px,py,on,ep,pc,cc, xc-WR,y0,xc+WR,y1) }
55func hbar(px: *i64, py: *i64, on: *i64, ep: *i64, pc: i64, cc: i64, x0: i64, x1: i64, yc: i64) -> i64 { return add_rect(px,py,on,ep,pc,cc, x0,yc-WH,x1,yc+WH) }
56func seg(px: *i64, py: *i64, on: *i64, ep: *i64, pc: i64, cc: i64, x0: i64, y0: i64, x1: i64, y1: i64) -> i64
66func ellipse(px: *i64, py: *i64, on: *i64, ep: *i64, pc: i64, cc: i64, cx: i64, cy: i64, rx: i64, ry: i64, ccw: i64) -> i64
72func cshape(px: *i64, py: *i64, on: *i64, ep: *i64, pc: i64, cc: i64, cx: i64, cy: i64, orx: i64, ory: i64, irx: i64, iry: i64) -> i64
77func cshapeL(px: *i64, py: *i64, on: *i64, ep: *i64, pc: i64, cc: i64, cx: i64, cy: i64, orx: i64, ory: i64, irx: i64, iry: i64) -> i64
83func arch(px: *i64, py: *i64, on: *i64, ep: *i64, pc: i64, cc: i64, cx: i64, cy: i64, orx: i64, ory: i64, irx: i64, iry: i64) -> i64
called by 1: gen_lower
89func uarch(px: *i64, py: *i64, on: *i64, ep: *i64, pc: i64, cc: i64, cx: i64, cy: i64, orx: i64, ory: i64, irx: i64, iry: i64) -> i64
called by 2: gen_uppergen_lower
96func gen_digit(d: i64, ep: *i64, px: *i64, py: *i64, on: *i64, meta: *i64) -> i64
called by 1: gen calls 5: ellipsesegvbarhbarcshapeL
111func gen_upper(L: i64, ep: *i64, px: *i64, py: *i64, on: *i64, meta: *i64) -> i64
called by 1: gen calls 6: seghbarvbarcshapeellipseuarch
142func gen_lower(c: i64, ep: *i64, px: *i64, py: *i64, on: *i64, meta: *i64) -> i64
called by 1: gen calls 7: ellipsevbarsegcshapehbararch+1
173func gen_punct1(k: i64, ep: *i64, px: *i64, py: *i64, on: *i64, meta: *i64) -> i64
called by 1: gen calls 7: vbaradd_recthbarsegellipsecshape+1
192func gen_punct2(k: i64, ep: *i64, px: *i64, py: *i64, on: *i64, meta: *i64) -> i64
203func gen_punct3(k: i64, ep: *i64, px: *i64, py: *i64, on: *i64, meta: *i64) -> i64
called by 1: gen calls 3: vbarhbarseg
213func gen_punct4(k: i64, ep: *i64, px: *i64, py: *i64, on: *i64, meta: *i64) -> i64
called by 1: gen calls 3: vbarhbarseg
221func gen(gid: i64, ep: *i64, px: *i64, py: *i64, on: *i64, meta: *i64) -> i64
232func adv_of(gid: i64) -> i64
called by 1: main
280func append_glyph(g: *u8, go: i64, ep: *i64, px: *i64, py: *i64, on: *i64, meta: *i64) -> i64
called by 1: main calls 3: w16si16w8
297func main() -> i64