sextile.viewdata.html¶
A frame as HTML, drawn with the Bedstead font.
render_html turns the runs styled_cells yields into a <pre> of ROWS rows, one <span> per run, its style carried by CSS classes rather than inline styles so a page can restyle the lot. Each row is exactly COLUMNS cells, the width the walk yields. Contiguous mosaics are the Symbols for Legacy Computing sextants, as the terminal render uses; separated mosaics are Bedstead’s Private Use glyphs, which no terminal font has. The stylesheet is shipped beside this module.
- sextile.viewdata.html.font_face()[source]¶
An @font-face rule for Bedstead, the font embedded as a data URI.
For a self-contained page – a sextile render –form html a reader opens with no server – so the mosaics draw without the font being fetched. A page that serves the font itself, as the documentation does, writes its own rule pointing at the file instead.
- Return type:
- sextile.viewdata.html.render_html(frame, *, css_class='viewdata')[source]¶
A frame as an HTML <pre>, one <span> a run, styled by class.
- Parameters:
- Return type:
- Returns:
A <pre> of ROWS lines, each exactly COLUMNS cells wide. The classes on the spans – fg-<colour>, bg-<colour>, and flash/conceal/dh where the style asks for them – are the ones the stylesheet defines.