code wiki / _hdl_build / nx_ocr_bench_render.nx

nx_ocr_bench_render.nx

buildroot/runtime/_hdl_build/nx_ocr_bench_render.nx

4010 B63 linesdepth 9pulls 30 transitivereach 0 importersview sourcekind benchtopic ocr
docsdependenciesstructsconstsfunctions

about

nx_ocr_bench_render.nx -- OCR-LEGIBILITY harness, OUR side: render the bench page through the REAL browser core (br_layout -> CSS cascade -> box layout -> br_draw_fb paint) exactly as the shipping shot path does, at TWO zooms: scale=1 (100%, the honest apples-to-apples vs Chrome/Edge at the same 1000px viewport) and scale=2 (200% zoom row, labeled separately). The browser-chrome strip is whited out so the URL-bar text can't pollute the OCR of PAGE content. Outputs: knowledge/status/ocr_bench_ours.png (scale 1) knowledge/status/ocr_bench_ours2x.png (scale 2, supplementary labeled row) The OCR judge (Windows.Media.Ocr -- a 3rd-party MEASURING INSTRUMENT, same instrument for all sides, like qemu/openssl oracles) + the sovereign scorer live in the census organ. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_browser_render.nx nx_itoa_lib.nx nx_ocr_bench_render.nx

imports: nx_browser_render.nxnx_itoa_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_read_file sys_openat_rd sys_lseek sys_mmap sys_read sys_close ob_puts br_layout br_slen sys_mmap ↻ rh_extract_styles sys_mmap ↻ nx_html_cursor_init nx_html_next_token _scan_name _is_name _is_void_element _lc nx_html_is_raw_text_tag _lc ↻ nx_html_consume_raw_text _lc ↻ _is_ws _lfd_name_eq _lfd_lc _rh_copy_css rh_filter_media sys_mmap ↻ rh_find rh_media_matches rh_find ↻ rh_num_after rh_digit cx_expand sys_mmap ↻ cx_collect cx_ch cx_is_ws cx_find

structs

none

consts

13const K_MAGIC_1500: i64 = 1500

functions

15func ob_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main
20func ob_num(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
23func ob_shot(page: *Page, lw: i64, scale: i64, path: *u8) -> i64
40func main() -> i64