code wiki / _hdl_build / nx_font_outline.nx
nx_font_outline.nx
buildroot/runtime/_hdl_build/nx_font_outline.nx
about
nx_font_outline.nx -- R1 of the sovereign-font ladder: the glyph OUTLINE MODEL in the exact TrueType glyf
layout (contour endPts[] + on-curve points px[]/py[] in FUnits, 1000-EM, y-up), authored as clean geometric
letters designed IN-HOUSE (sovereign, no glyph copied). This is the data R2 (nx_font_ttf_emit) serializes into
a real .ttf. A gate validates every glyph is glyf-ready (endPts monotonic, each contour >=3 pts, points in
int16 range, bbox sane) with a negative control. Glyphs: .notdef, space, H, I, T (renders "HI"/"HIT"/"THI").
license_tier: ORIGINAL expect_exit: 0
dependencies 1 imports · 0 importers
imports: nx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 8 | const K_MAGIC_99999: i64 = 99999 |
| 9 | const K_MAGIC_16000: i64 = 16000 |
functions
| 11 | func sw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 12 | func 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 } |
| 15 | func fill_notdef(ep: *i64, px: *i64, py: *i64, meta: *i64) -> i64 called by 1: main |
| 19 | func fill_space(ep: *i64, px: *i64, py: *i64, meta: *i64) -> i64 { meta[0]=0; meta[1]=0; return 0 } called by 1: main |
| 20 | func fill_H(ep: *i64, px: *i64, py: *i64, meta: *i64) -> i64 called by 1: main |
| 26 | func fill_I(ep: *i64, px: *i64, py: *i64, meta: *i64) -> i64 called by 1: main |
| 30 | func fill_T(ep: *i64, px: *i64, py: *i64, meta: *i64) -> i64 called by 1: main |
| 37 | func validate(name: *u8, ep: *i64, px: *i64, py: *i64, meta: *i64) -> i64 |
| 72 | func main() -> i64 |