Tree:
5df5f65b4f
master
v0.1a
${ noResults }
4 Commits (5df5f65b4f774c36accb455796e8cc2a74830705)
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
5df5f65b4f |
punknative generator: nav index, per-form arg tables, terminal-black backdrop, integer row pitch
Improvements from user review of the punk::ansi trial page: - command index <nav> at page top (doctools-style jump list); hook to display @package info above it when specs carry package_info (guarded - key absent in older punk::args spec dicts) - multiform commands: punk::args::usage renders all form synopses but only the default form arg table (terminal UX expects i -form N) - the page now adds a per-form ARG TABLE for each form that has arguments, trimmed at the table-header separator so the command/description/synopsis panel is not repeated per form (renderspace lines are colour-self-contained, so slicing at a line boundary is safe); argument-less forms are skipped - pre backdrop is now true black (page body stays dark grey): overtype::renderspace overlay output emits explicit SGR 40 and example helpers treat default background as the terminal backdrop - on black they blend as in a terminal (proper fix = default-colour semantics, goal) - row pitch line-height:17px (integer, just under the 17.85px inline background height at font-size 15.36px) - the fractional 1.15em pitch put row boundaries at fractional positions and showed periodic hairline gaps through solid-bg runs - explicit package require punk::lib (tstr placeholder resolution uses punk::lib::undent; previously loaded only by transitive luck when usage ran before get_spec) Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
2 days ago |
|
|
60dd6094c7 |
fontprep/punknative: settle ansi-art html rendering recipe; reproducible font builds; revert metric-normalization experiment
Outcome of empirical seam/aspect testing of the ansi2html rendering against src/testansi cp437 art (chrome + firefox, user-verified): - punkdoc-mono.woff2 rebuilt with STOCK line metrics. The interim normalize-to-win-metrics experiment (hhea/typo := win) is REJECTED and now documented: it grows browsers'"'"' inline content area to 1.3213em, so at row pitches below that every span'"'"'s background bleeds ~2.5px into neighbouring rows - wrong-coloured bars under solid blocks. Kept as commented-out normalize_line_metrics() in make_punkdoc_mono.py with rationale. - font builds are now byte-reproducible: TTFont(..., recalcTimestamp=False) keeps the source head.modified (two consecutive builds hash identically). README records the new output sha256 and the reproducibility note, plus a cell-geometry section for css authors (0.5859375em advance -> integer 9px cells at font-size 15.36px; blocks paint the 1.3213em win cell) and the settled art recipe: stock metrics + tight line-height:1.0 pitch + transform:scaleY(1.3212890625) for terminal aspect (accepted trade-off: minor residual sub-pixel seams; deterministic future fix would be inline-block cell-grid emulation). Larger pitches (17.85/20px) tested and rejected - stark row seams. - punkargs_punknative.tcl: font-size 13px -> 15.36px (integer cell width - fractional advances round differently at styled-span boundaries and seam block/border glyphs); line-height stays 1.15 for text-oriented doc tables. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
2 days ago |
|
|
c18ca90a70 |
doc tooling: vendor punkdoc-mono web font (OFL subset of Cascadia Mono 2404.23) + -assets embed|link|none in punknative generator
src/scriptapps/tools/fontprep/: pinned monospace web font for the punk-native html doc pipeline, closing the glyph-coverage gap the probe identified - unicode 16 octants (U+1CC00-1CEBF) and Symbols for Legacy Computing (U+1FB00-1FBFF) needed by ansicat/textblock rendering are absent from commonly-installed monospace fonts (even system Cascadia copies are commonly pre-2404 and lack them). - punkdoc-mono.woff2: glyph subset of Cascadia Mono v2404.23 VARIABLE ttf (wght axis 200-700 kept - true bold from one ~80KB file; 1561 cmap codepoints incl. full CP437 repertoire, box/blocks/geometric, braille, legacy computing + octants). Coverage verified 157/160 against the measured glyph inventory - identical to the full source font (misses are deliberate: em-space + fullwidth forms are converter-normalization/fallback territory). - renaming is REQUIRED by licence: Cascadia's SIL OFL 1.1 declares Reserved Font Name "Cascadia Code" and subsetting is modification. Name table is surgical: family records renamed, Microsoft copyright preserved verbatim (OFL requirement), trademark record removed (a renamed copy must not assert Microsoft's mark), OFL statement/url in licence records, provenance credit in the description record. - LICENSE-cascadia-OFL.txt (from the v2404.23 tag), punkdoc-unicodes.txt (whole-block ranges with headroom), make_punkdoc_mono.py (fonttools subset+ rename script), README.md (full provenance: source/output sha256s, exact command, regeneration steps). Python fonttools is one-time prep tooling only - the doc build never invokes it; generators just read the .woff2. Track licence in the G-063 inventory. punkargs_punknative.tcl: new -assets option consuming the vendored font: embed (default) = data-uri @font-face, fully self-contained page; link = copy punkdoc-mono.woff2 beside the output and reference relatively (shared+cached across a doc set); none = css stack only, with warn-and-degrade when the asset is missing. font-weight 200 700 descriptor, punkdoc-mono prepended to the fallback stack. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
2 days ago |
|
|
c668cb85c1 |
doc tooling: punk::args -> doctools + punk-native html/md converter prototypes
Two G-candidate prototypes under src/scriptapps/tools/ for punk::args as the documentation source of truth (run against bootsupport modules with a plain tclsh, e.g: tclsh punkargs_to_doctools.tcl punk::path out.man): - punkargs_to_doctools.tcl: package's punk::args definitions -> doctools .man (Tcl-standard [arg]/[opt] synopsis conventions by design - punk s-style is out of scope for the doctools target). Covers @cmd summary/help, per-form [call] synopses, argument detail lists in argspace order (leaders/options/ trailing values), constraint sentences (defaults/choices/ranges), id aliases as cross-references. Validated via 'dtplite validate' (bin/dtplite.cmd); punk::path trial output renders clean through the html/text/nroff engines. - punkargs_punknative.tcl: doctools-free pipeline faithful to punk s-style. html = punk::args::usage ANSI output converted via a minimal SGR->CSS ansi2html (16/256/truecolour, bold/dim/italic/underline/strike/reverse) on punk::ansi::ta::split_codes - candidate for a punk::ansi public api (also the docs-screenshot enabler for ansicat/textblock output). markdown = GFM with verbatim s-style synopsis fences + per-form argument tables. -boxmap none (default) keeps faithful heavy box glyphs; -boxmap light maps to the light set as a portability fallback. Key findings baked into the code comments: - css font stacks must be set on the pre element itself - the UA stylesheet's 'pre {font-family:monospace}' overrides body inheritance (cause of an initially-misdiagnosed overlong-border rendering bug) - glyph coverage probe over src/testansi + textblock::periodic/frames + punk::args::usage (160 codepoints incl. unicode 16 octants and legacy computing blocks): Cascadia Mono >=2404.23 covers 157/160; embedding or referencing a pinned punkdoc-mono font remains the plan for doc-set output since octant/legacy glyphs are absent from commonly installed fonts. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com |
2 days ago |