You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: the chat agent's text annotation is not fitted to its text, and wraps out of its box in 9:16 #1159
Found during the v2.1.0 release-candidate e2e pass (macOS 26.5 arm64, CI build of release/v2.1.0 @ 9c55596, results row in #1131).
Repro
In the chat panel, in one turn: "add a title 'Demo OpenScreen' from 0:01 to 0:04, then switch the format to vertical 9:16". The agent calls addAnnotation, then setAspectRatio.
Stored annotation
type text, content "Demo OpenScreen", position x 2.33 %, y 45.33 %, size 95.34 % x 9.33 %, fontSize 64, Inter bold, centred, plate rgba(0,0,0,0.7), space "frame".
Actual
In the preview and in the exported 1080x1920 frame at 3.0 s only "Demo" shows; "OpenScreen" wraps onto a second line outside the box.
Expected
The box fitted to the text, as the inspector sizes it, and the title kept on its line across the format change.
Cause
The agent's tools run in the main process, where measureTextBlock (src/lib/ai-edition/annotations/placement.ts) has no OffscreenCanvas and falls back to an average advance of 0.56 em. Inter bold "Demo OpenScreen" at 64 px is 586.5 px wide (hmtx advances of public/fonts/Inter-Bold.ttf); the estimate is 537.6 px. The stored numbers match the estimate exactly: 30.17 % of a 16:9 frame (579 px, leaving 554 px inside the plate for 587 px of words), height 9.33 % (1.25 em line), then scaled by 16/9 / 9/16 to 95.34 % by refitFrameAnnotations, which keeps a text box's shape rather than refitting it. So the box was already too narrow in 16:9, and at 64 px the title cannot fit a portrait frame's width on one line at all (628 px of box for 607.5 px of frame at the reference height).
Platform: all (the measurement runs in the main process on every OS).
This change is assigned to the Next Release release milestone and is not necessarily available in the latest downloadable desktop release yet. It is currently marked as status: pending release until a packaged release containing it is published.
Activity
github-actions commentedon Oct 12, 2026
Fixed by #1160 and merged into
main.This change is assigned to the
Next Releaserelease milestone and is not necessarily available in the latest downloadable desktop release yet. It is currently marked asstatus: pending releaseuntil a packaged release containing it is published.fix(agent): fit a text annotation to its words in the shipped fonts, …