aboutsummaryrefslogtreecommitdiffstats
path: root/surfaces/pixels.c
Commit message (Collapse)AuthorAgeFilesLines
* Show what would act on a screen as a picture on every surface, and keep a ↵eunhhu2026-09-301-2/+1
| | | | | | | | | | | | | | | | | | | value's bidi within it Speech wrote a value's C1 controls (U+009B is a CSI to some terminals), DEL, line separators and bidi overrides as they were; the CLI and the TUI wrote line separators (a pipe's reader may break its line there) and the controls that turn text around (a terminal then reverses the rest of its line, other values' cells too); the web page showed controls as they were and let a label's override reverse its badge. Now every surface shows controls, DEL, C1 and line and paragraph separators as pictures (vega_visible); a terminal's cells show embeddings, overrides and isolates as U+FFFD too (vega_cell); speech says a space for the one and nothing for the other; the page shows the pictures and isolates each value, while /screen's JSON keeps values as they are. screen_meaning checks the CLI, the TUI, speech and the JSON against that rule, and that nothing a value holds reaches any output as a control; the browser check sees the page show it.
* Set type on the pixel surfaces: the grid lays out, the fonts shapeeunhhu2026-09-281-31/+291
| | | | | | | | | | | | | | | | | | | | | | | | vega_draw keeps what it wrote as spans (VegaSpan: a row, the columns it was given, where its cells reached, its text and tone). A span written where the same pen stopped follows the one before it (a field's name and value, the help line, the prompt); one written after the pen moved (a table's column, a list's label, a badge) starts afresh at its column, and a badge sits flush with its end. When the first font shapes, the pixels set type: a span and those following it are one line of text, laid out as one paragraph in the font stack (bidi and kerning cross the spans; each glyph takes the tone of the span its character came from), from its column up to the nearest of its spans' ends and the next span on the row, cut at a grapheme cluster boundary with an ellipsis if it must be. The prompt gets a text cursor. --symbols repeats: fonts in order of preference (at most 8); the cells, when the first font does not shape, also fall back through them. The check sets a label in one script, alone in its list, and holds it to what the font that has it sets by itself (vega-symbols paragraph, which now sizes itself to its text with width 0), pixel for pixel: Latin kerning, Hangul, Arabic and Devanagari over DejaVu Sans, Noto Sans CJK KR and FreeSans.
* Centre a wide character's glyph in its two cellseunhhu2026-09-271-1/+5
| | | | | | | | A Hangul or CJK glyph is one em across, less than two cells of a monospace Latin font (1.2 em for DejaVu Sans Mono), and was drawn from the left of its cells, so syllables stood apart unevenly. A cached glyph now keeps its advance in pixels, and a wide character's glyph is drawn centred in its two cells.
* Put the frames on a display through KMS, checked by writebackeunhhu2026-09-271-0/+4
| | | | | | | | | | | | | | | vega display draws the same frames on a display with the kernel's mode setting and no library between: a connected connector's mode on a CRTC, its primary plane flipped between two dumb buffers by atomic commits, the grid as many cells as fit. Frames are drawn in cached memory and copied over, since blending over write-combined buffers read them back slowly (a 1080p frame took 370 ms; now 20.6 ms with a vertical sync and the check below). This Pi has no screen but its display controller has writeback connectors: --writeback sets a mode on one and takes every frame back as the controller put it out. Each came back exactly as drawn, and the new check finds it the pixel surface's frame for the same grid, pixel for pixel.
* Draw the TUI's cells as pixels with the symbols' glyphseunhhu2026-09-271-0/+90
vega pixels runs the same scripts as tui --dump and writes each frame as an image: the view's cells (only those on screen are evaluated) become glyphs, each drawn once per size with the exact area of its curves, in its tone's colour on its row's background. No page, no scene in between. A 1920x1350 grid takes 12 ms a frame here, writing the image included. Symbol files carry the font's line now (format 3: ascent and descent where format 2 kept zeros), the cell height and baseline; and the build tool takes fonts in order, later ones filling the codes earlier ones lack: a CJK font alone drew ambiguous-width arrows two cells wide in a one-cell grid, which the new check caught, so a monospace Latin font comes first and Hangul after.