code wiki / _hdl_build / nx_glyph_compose.nx

nx_glyph_compose.nx

buildroot/runtime/_hdl_build/nx_glyph_compose.nx

3784 B79 linesdepth 3pulls 5 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_glyph_compose.nx -- RUNG 2+3 of the sovereign font BUILDER: COMPONENTS + COMPOSITION (the kanji-scaling heart). A COMPONENT (radical) is a stroke group defined ONCE in a 0..1000 em box; a glyph is a COMPOSITION of that component placed by a transform (offset+scale). Proof: define 木 (tree) once, render it standalone AND compose 林 (forest) = 木 placed LEFT + 木 placed RIGHT -- the SAME radical reused -> adding a script is DATA (more components + compositions), not a new engine. Renders AA -> _offc/nx_aa_kanji.png. ORIGINAL.

dependencies 3 imports · 0 importers

nx_glyph_stroke.nx nx_aa_raster.nx nx_png_write.nx nx_glyph_compose.nx

imports: nx_glyph_stroke.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 gs_init_trig comp_tree put_tstroke gs_stroke gs_seg gs_isqrt gs_disc aa_render aa_inside aa_blit nx_png_write_rgb sys_openat_wr sys_mmap sys_write pw_chunk pw_u32be sys_mmap ↻ sys_write ↻ sys_write ↻ pw_crc_block pw_adler32 sys_close

structs

none

consts

9const K_MAGIC_1080: i64 = 1080
10const K_MAGIC_8192: i64 = 8192
11const K_MAGIC_1024: i64 = 1024

functions

15func put_tstroke(xs: *i64, ys: *i64, cstart: *i64, clen: *i64, np: *i64, nc: *i64, cs: *i64, sn: *i64,
called by 1: comp_tree calls 1: gs_stroke
30func comp_tree(xs: *i64, ys: *i64, cstart: *i64, clen: *i64, np: *i64, nc: *i64, cs: *i64, sn: *i64,
called by 1: main calls 1: put_tstroke
46func main() -> i64