code wiki / (root) / nx_glyph_stroke.nx

nx_glyph_stroke.nx

buildroot/runtime/nx_glyph_stroke.nx

13175 B288 linesdepth 2pulls 2 transitivereach 97 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_glyph_stroke.nx -- RUNG 1 of the sovereign FONT BUILDER: the STROKE PEN. A glyph stroke is a centerline polyline + a width; this renders it as a filled thick outline (perpendicular-offset segment quads + round joins/caps as discs), all wound the SAME way so the AA rasterizer's nonzero fill UNIONS them into one smooth shape. Curves are just a curved centerline -> the hard letters (s, arches) become easy, and it's the natural unit for CJK strokes/radicals (the path to kanji). No floats: integer isqrt for the perpendicular. ORIGINAL.

dependencies 1 imports · 4 importers

nx_syscalls.nx nx_glyph_stroke.nx nx_font.nx nx_font_test.nx nx_glyph_compose.nx nx_glyph_word.nx

imports: nx_syscalls.nx

imported by: nx_font.nxnx_font_test.nxnx_glyph_compose.nxnx_glyph_word.nx

structs

none

consts

7const K_MAGIC_250000: i64 = 250000

functions

10func gs_isqrt(n: i64) -> i64
19func gs_seg(xs: *i64, ys: *i64, cstart: *i64, clen: *i64, np: *i64, nc: *i64, x0: i64, y0: i64, x1: i64, y1: i64, w: i64) -> i64
called by 2: gs_strokegs_stroke_mod2 calls 1: gs_isqrt
38func gs_disc(xs: *i64, ys: *i64, cstart: *i64, clen: *i64, np: *i64, nc: *i64, cs: *i64, sn: *i64, cx: i64, cy: i64, r: i64, rev: i64) -> i64
58func gs_stroke(xs: *i64, ys: *i64, cstart: *i64, clen: *i64, np: *i64, nc: *i64, cs: *i64, sn: *i64, ptsx: *i64, ptsy: *i64, n: i64, w: i64) -> i64
called by 2: put_tstrokeput_stroke calls 2: gs_seggs_disc
84func gs_stroke_mod2(xs: *i64, ys: *i64, cstart: *i64, clen: *i64, np: *i64, nc: *i64, cs: *i64, sn: *i64,
125func gs_area2(px: *i64, py: *i64, n: i64) -> i64
133func gs_emit_oriented(xs: *i64, ys: *i64, cstart: *i64, clen: *i64, np: *i64, nc: *i64,
called by 1: gs_stroke_var calls 1: gs_area2
158func gs_stroke_var(xs: *i64, ys: *i64, cstart: *i64, clen: *i64, np: *i64, nc: *i64,
270func gs_init_trig(cs: *i64, sn: *i64) -> i64
called by 3: mainmainmain