aboutsummaryrefslogtreecommitdiffstats
path: root/symbols/symbols-gl.h
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-09-27 14:54:53 +0100
committereunhhu <[email protected]>2026-09-27 14:54:53 +0100
commit993871c6dfa19cf4e0bd4a16c9aad26cb0025d70 (patch)
treea83e5bc75d859ca5bee96b26700a9419e687cd1a /symbols/symbols-gl.h
parent2c1e29780da41bba13ac84ad01472d550e6d02e8 (diff)
downloadvega-993871c6dfa19cf4e0bd4a16c9aad26cb0025d70.tar.gz
vega-993871c6dfa19cf4e0bd4a16c9aad26cb0025d70.zip
Draw the TUI's cells as pixels with the symbols' glyphs
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.
Diffstat (limited to 'symbols/symbols-gl.h')
-rw-r--r--symbols/symbols-gl.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/symbols/symbols-gl.h b/symbols/symbols-gl.h
index 919a114..cc316a4 100644
--- a/symbols/symbols-gl.h
+++ b/symbols/symbols-gl.h
@@ -14,17 +14,12 @@ typedef struct {
GLint target;
} VegaGl;
-/* Where each symbol is in an atlas: its rectangle there (x, y, width, height)
- * and the pixel offset of that rectangle's top left from the symbol's origin
- * (right, up). A symbol with nothing to draw has an empty rectangle. */
-typedef struct { int32_t x, y, width, height, left, top; } VegaPlace;
-
typedef struct {
GLuint texture; /* 8-bit coverage */
int width, height;
float scale; /* pixels per unit */
uint32_t symbols;
- VegaPlace *places; /* per symbol index */
+ VegaPlace *places; /* per symbol index: its box and where the atlas keeps it */
} VegaAtlas;
/* A symbol at a pen position (whole pixels from the target's top left, on the