code wiki / (root) / nx_doc_to_urf.nx

nx_doc_to_urf.nx

buildroot/runtime/nx_doc_to_urf.nx

2547 B49 linesdepth 4pulls 7 transitivereach 2 importersview sourcekind librarytopic doc
docsdependenciesstructsconstsfunctions

about

nx_doc_to_urf.nx -- render a whole text document across as many pages as needed into ONE multi-page URF. Composes nx_doc_layout (word-wrap layout, returns chars-consumed per page) + nx_urf (file/page headers) + nx_pwg_rle. URF multi-page layout = file-header(pageCount) then N x (32-byte page-header + RLE data). PURE w.r.t. the printer (builds bytes) -> never-brick. Sovereign. license_tier: ORIGINAL genealogy_id: project-printer-management-ipp-sclass-2026-06-20

dependencies 4 imports · 2 importers

nx_doc_layout.nx nx_pwg_rle.nx nx_urf.nx nx_toner_meter.nx nx_doc_to_urf.nx nx_doc_print.nx nx_doc_to_urf_test.nx

imports: nx_doc_layout.nxnx_pwg_rle.nxnx_urf.nxnx_toner_meter.nx

imported by: nx_doc_print.nxnx_doc_to_urf_test.nx

structs

none

consts

12const NX_DOC_MAX_PAGES: i64 = 200 // safety cap (a runaway loop backstop)

functions

16func nx_doc_to_urf(out: *u8, bm: *u8, W: i64, H: i64, table: *u8, text: *u8, scale: i64,