code wiki / _hdl_build / nx_font_mockup.nx

nx_font_mockup.nx

buildroot/runtime/_hdl_build/nx_font_mockup.nx

6305 B130 linesdepth 5pulls 7 transitivereach 0 importersview sourcekind tooltopic font
docsdependenciesstructsconstsfunctions

about

nx_font_mockup.nx -- a STANDALONE before/after typography mockup (NOT wired into any browser). Renders the same paragraph three ways into one PNG so the operator can pick the direction by eye: (1) CURRENT -- the 8x8 bitmap font that ships now (monospace, blocky). (2) ATTEMPT -- the vector font crammed into the layout's fixed 9px monospace cell at ~11px (the one that "looked way worse": small + monospace + muddy AA). (3) TARGET -- the SAME vector font rendered PROPORTIONALLY at a real body size (~16px cap) with line spacing (the Chrome-like goal). Proves whether proportional+size fixes it. Uses the sovereign TTF engine (nx_ttf_fontlib) + our own nishi_sans.ttf + nx_png_write. 100% sovereign. expect_exit: 0 license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_ttf_fontlib.nx nx_font8x8.nx nx_png_write.nx nx_font_mockup.nx

imports: nx_ttf_fontlib.nxnx_font8x8.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 nx_framebuffer_init mk_fill tf_load sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close tf_find_table tf_rd16 tf_rd32 tf_rd16s tf_rd16 ↻ tf_rd32 ↻ tf_rd16 ↻ mk_slen mk_draw8 font8x8_table sys_mmap ↻ fg mk_rect mk_para8 mk_draw8 ↻ mk_rect ↻ mk_para_vec tf_char_adv tf_glyph tf_cmap_lookup tf_rd16 ↻ tf_rd16s ↻ tf_rd16 ↻ sys_mmap ↻ tf_glyph_edges tf_rd16 ↻ tf_rd32 ↻ tf_rd16s ↻ sys_mmap ↻

structs

none

consts

none

functions

14func mk_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: main
17func mk_fill(px: *u8, W: i64, H: i64, r: i64, g: i64, b: i64) -> i64
called by 1: main
22func mk_rect(px: *u8, W: i64, H: i64, x: i64, y: i64, w: i64, h: i64, r: i64, g: i64, b: i64) -> i64
called by 2: mk_draw8main
29func mk_draw8(px: *u8, W: i64, H: i64, x0: i64, y0: i64, s: *u8, n: i64, scale: i64, r: i64, g: i64, b: i64) -> i64
called by 2: mk_para8main calls 2: font8x8_tablemk_rect
45func mk_para8(px: *u8, W: i64, H: i64, x0: i64, y0: i64, maxw: i64, s: *u8, n: i64, scale: i64, lh: i64, r: i64, g: i64, b: i64) -> i64
called by 1: main calls 1: mk_draw8
69func mk_para_vec(fh: *i64, fb: *Framebuffer, px: *u8, W: i64, H: i64, x0: i64, y0: i64, maxw: i64, s: *u8, n: i64, ph: i64, mono: i64, lh: i64, r: i64, g: i64, b: i64) -> i64
called by 1: main calls 2: tf_char_advtf_draw_text
94func main() -> i64