code wiki / _hdl_build / nx_vecfont_body_bench.nx
nx_vecfont_body_bench.nx
buildroot/runtime/_hdl_build/nx_vecfont_body_bench.nx
about
nx_vecfont_body_bench.nx -- decide the FONT arc with a measurement, not a guess. Renders the SAME
lowercase phrase through the sovereign stroke-VECTOR font (nx_font -> aa_raster) at HEADLINE size and
at BODY size, so we can see where the vector font wins (big = smooth curves shine) vs where it may lose
(small = no hinting, could blur below the crisp AA bitmap). Outputs two PNGs to eyeball + OCR + AA-measure.
This grounds "wire the vector font for headings, keep the bitmap for body" (the hybrid) with evidence.
expect_exit: 0 license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_font.nxnx_aa_raster.nxnx_png_write.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
| 10 | const K_MAGIC_400000: i64 = 400000 |
| 11 | const K_MAGIC_40000: i64 = 40000 |
| 12 | const K_MAGIC_1600: i64 = 1600 |
| 13 | const K_MAGIC_1400: i64 = 1400 |
| 14 | const K_MAGIC_1100: i64 = 1100 |
| 15 | const K_MAGIC_1500: i64 = 1500 |
| 16 | const K_MAGIC_1700: i64 = 1700 |
| 17 | const K_MAGIC_1550: i64 = 1550 |
| 18 | const K_MAGIC_1050: i64 = 1050 |
| 19 | const K_MAGIC_1250: i64 = 1250 |
| 20 | const K_MAGIC_2200: i64 = 2200 |
functions
| 22 | func vb_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: main |
| 23 | func vb_puts(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 |
| 24 | func vb_num(v: i64) -> i64 { let b: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m} 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{b[i]=t[k-1-i];i=i+1} sys_write(1,b,k); return 0 } |
| 27 | func vb_render(text: *u8, n: i64, px: i64, W: i64, H: i64, path: *u8) -> i64 |
| 54 | func main() -> i64 |