fix(web): anchor the terminal grid to the bottom and serialize setFont

Resizing the drawer made lines snap up and down: the grid was anchored
to the top padding, so the sub-row remainder accumulated at the bottom
and the prompt jumped a full row whenever a drag crossed a row
boundary. The grid origin now anchors to the bottom edge — the
remainder sits above row 0, the bottom edge (where the prompt lives)
tracks the container exactly, and row changes grow or shrink the
history at the top. The origin threads through the renderer, hit
testing, IME positioning, the selection-action rect, and the mouse
encoder's per-side vertical padding. This also smooths the equivalent
snapping that existed with xterm on main.

setFont now resolves the requested face and size into locals, tags the
call with an epoch, and only commits fields plus re-measured metrics
after its font load wins — overlapping calls can no longer finish out
of order or leave the fields ahead of the metrics.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
c94e6bf56dWout Stiens committed on 7/31/2026, 10:38:00 AMparentb72cc87
4 files changedLine totals unavailable