Module splash_text

Module splash_text 

Source
Expand description

Software text blitter for the splash footer — shared by the Linux software buffers (splash_linux) and the Win32 layered-window DIB (splash.rs). macOS uses native NSTextField instead, so it does not use this module.

Composites grayscale glyph coverage (splash_font) into a pre-multiplied 4-bytes-per-pixel buffer (the same format render_frame / the DIB produce): dst = dst*(1-a) + color*a, with a = coverage * window_alpha, so the footer fades in/out with the rest of the card.

Functions§

draw_text
Blit text into buf (pre-multiplied, buf_w×buf_h, 4 bpp) with top-left at (x0, y0). color is straight RGB; window_alpha scales the whole draw (fade); bgr selects byte order (true → B,G,R,A as Wayland ARGB8888-on-LE / X11 ARGB / Win32 BGRA expect, false → R,G,B,A).
draw_text_centered
Horizontally-centered draw_text at row y0.
glyph_index 🔒
text_width
Pixel width of s rendered in the monospace glyph cell.