code wiki / _hdl_build / nx_font_screen_tiers.nx

nx_font_screen_tiers.nx

buildroot/runtime/_hdl_build/nx_font_screen_tiers.nx

5844 B92 linesdepth 4pulls 6 transitivereach 0 importersview sourcekind tooltopic font
docsdependenciesstructsconstsfunctions

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

nx_font.nx nx_aa_raster.nx nx_png_write.nx nx_font_screen_tiers.nx

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

main ts_puts ts_render ts_slen font_spec_reset font_spec_geo font_spec_mod font_spec_swell font_spec font_trig_init font_text font_sp_shift_disp font_sp_shift_geo font_sp_shift font_ws font_wdth font_emit font_emit_geo font_weight font_mod fe_ring fe_stroke geo_arc fe_stroke ↻ fe_stroke ↻ geo_earc fe_stroke ↻ font_weight ↻ font_mod ↻ font_ws ↻ font_wdth ↻ font_slant fe_stroke ↻ gs_disc fe_ring ↻ font_adv font_adv_em font_adv_em_base font_adv_em_base_geo font_ws ↻

structs

none

consts

12const K_MAGIC_300000: i64 = 300000
13const K_MAGIC_30000: i64 = 30000

functions

15func 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
16func 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
17func 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
22func ts_render(text: *u8, empx: i64, ss: i64, wt: i64, thresh: i64, path: *u8) -> i64
63func main() -> i64