code wiki / _hdl_build / nx_font_mockup.nx
nx_font_mockup.nx
buildroot/runtime/_hdl_build/nx_font_mockup.nx
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
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
structs
| none |
consts
| none |
functions
| 14 | func mk_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: main |
| 17 | func mk_fill(px: *u8, W: i64, H: i64, r: i64, g: i64, b: i64) -> i64 called by 1: main |
| 22 | func mk_rect(px: *u8, W: i64, H: i64, x: i64, y: i64, w: i64, h: i64, r: i64, g: i64, b: i64) -> i64 |
| 29 | func 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 |
| 45 | func 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 |
| 69 | func 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 |
| 94 | func main() -> i64 |