nx_nishi_font_core.nx
buildroot/runtime/nx_nishi_font_core.nx
about
nx_nishi_font_core.nx -- the PURE, IMPORT-FREE core of the sovereign Nishi stroke font. Contains the
glyph stroke designs + the supersampled-mask rasterizer + a BASE-RELATIVE i64-framebuffer blit that takes
a CALLER-PROVIDED scratch mask (no sys_mmap) so it runs unchanged in our browser WASM (linear mem, base=0).
NO imports -> compiles to clean WAT with no un-lowerable syscalls. The u8/PNG path (nf_render_glyph) +
demo + gate live in nx_nishi_font.nx, which imports this. Monoline sans-serif, 4x supersample box AA, all
integer (no float). Grid: x,y in EM units, EM height 28; cap-top y=4, baseline y=22. Glyph set: N I S H B
R O W E + 0-9 + space. Every glyph DESIGNED here (no glyph copied from any font -> no license). license_tier: ORIGINAL
dependencies 0 imports · 12 importers
diagram shows first 10 each side; +0 more imports, +2 more importers in the complete lists below.
imports: none
imported by: nx_nishi_font.nxnx_wasm_2048.nxnx_wasm_adventure.nxnx_wasm_arcade.nxnx_wasm_city.nxnx_wasm_diablo.nxnx_wasm_platformer.nxnx_wasm_pong.nxnx_wasm_racing.nxnx_wasm_shmup.nxnx_wasm_td.nxnx_wasm_thirdperson.nx
structs
| none |
consts
| 9 | const NF_SS: i64 = 4 // supersample factor |
| 10 | const NF_EM: i64 = 28 // EM height in design units |
| 11 | const NF_ADV_U: i64 = 20 // advance width in design units |
functions
| 14 | func nf_u(u: i64, ch: i64) -> i64 { return u * ch * NF_SS / NF_EM } called by 1: nf_us |
| 17 | func nf_stamp(mask: *u8, mw: i64, mh: i64, cx: i64, cy: i64, r: i64) -> i64 called by 1: nf_seg |
| 37 | func nf_seg(mask: *u8, mw: i64, mh: i64, x0: i64, y0: i64, x1: i64, y1: i64, r: i64) -> i64 |
| 54 | func nf_us(mask: *u8, mw: i64, mh: i64, ux0: i64, uy0: i64, ux1: i64, uy1: i64, ch: i64, r: i64) -> i64 |
| 60 | func nf_glyph(mask: *u8, mw: i64, mh: i64, gid: i64, ch: i64, r: i64) -> i64 |
| 149 | func nf_adv_px(ch: i64) -> i64 { return ch * NF_ADV_U / NF_EM } |
| 155 | func nf_blit_glyph_mem(fb: *i64, fbw: i64, fbh: i64, mask: *u8, ox: i64, oy: i64, ch: i64, gid: i64, ink: i64) -> i64 |
| 204 | func nf_draw_text_mem(fb: *i64, fbw: i64, fbh: i64, mask: *u8, ox: i64, oy: i64, ch: i64, s: *u8, slen: i64, ink: i64) -> i64 |