Lets a host page embed hb-gpu-demo as an iframe and drive it
from outside. harfbuzz-world.cc uses this to share its
text/font controls with the GPU tab without reinventing the
GPU stack.
Shell additions:
- ?embed=1 URL param hides the demo's own chrome (font
picker, text button, backend selector, FPS counter,
keyboard-help overlay) by setting html.embed.
- Message protocol:
{ kind: 'text', value: '…' } -> applyText
{ kind: 'font', bytes: ArrayBuffer } -> _web_load_font
On runtime init the shell posts { kind: 'ready' } to its
parent so the host can send font bytes (which can't ride
on the URL for file-uploaded fonts).
Existing ?text= and ?font= URL params still work and are
useful for "link to a specific demo" sharing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>