code wiki / _hdl_build / nx_font_screen_tiers.nx
nx_font_screen_tiers.nx
buildroot/runtime/_hdl_build/nx_font_screen_tiers.nx
about
nx_font_screen_tiers.nx -- can the typography EMITTER target screens from low-quality industrial panels to
high-quality OLED and above? It renders the SAME phrase four ways, each TUNED by the emitter for that screen
class (the parametric knobs = the adaptation): heavier weight + 1-bit threshold for a cheap mono panel where
thin anti-aliased strokes would vanish; progressively lighter + more anti-aliasing as the pixel budget grows;
full refined weight + high supersampling for OLED/retina. Each tier is written at its NATIVE pixel size so the
OCR judge reads exactly what that screen would show -> proves legibility across the whole range. Plus an
upscaled (nearest-neighbour) strip per tier so the hard industrial pixels vs the smooth OLED edges are visible.
license_tier: ORIGINAL expect_exit: 0
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
| 12 | const K_MAGIC_300000: i64 = 300000 |
| 13 | const K_MAGIC_30000: i64 = 30000 |
functions
| 15 | func ts_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: ts_render |
| 16 | func ts_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 |
| 17 | func ts_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 } called by 1: main |
| 22 | func ts_render(text: *u8, empx: i64, ss: i64, wt: i64, thresh: i64, path: *u8) -> i64 called by 1: main calls 10: ts_slenfont_spec_resetfont_spec_geofont_spec_modfont_spec_swellfont_spec+4 |
| 63 | func main() -> i64 |