# fix\(web\): anchor the terminal grid to the bottom and serialize setFont · stienswout/t3code

[View on GitCafe](https://git.cafe/stienswout/t3code/commit/c94e6bf56d51b9bb3bec457a608ea6e65c52826a)

Repository: [stienswout/t3code](https://git.cafe/stienswout/t3code)

Visibility: public

Requested revision: c94e6bf56d51b9bb3bec457a608ea6e65c52826a

Requested commit: c94e6bf56d51b9bb3bec457a608ea6e65c52826a

Commit: c94e6bf56d51b9bb3bec457a608ea6e65c52826a

Tree: 2aabbee00f02bb12e7596c88191d37621c8b2885

Author: Wout Stiens

Committer: Wout Stiens

## Message

```
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>

```

## Parents

- [b72cc87c3e04c0c8c3b2778b5569fc4a1db71a74](https://git.cafe/stienswout/t3code/commit/b72cc87c3e04c0c8c3b2778b5569fc4a1db71a74?format=markdown)

[Source at this commit](https://git.cafe/stienswout/t3code/tree/c94e6bf56d51b9bb3bec457a608ea6e65c52826a?format=markdown)
