Files
harfbuzz/util/gpu
Behdad EsfahbodandClaude Opus 4.6 bdea49603c [util/gpu/web] Add embed-mode + postMessage protocol to the web demo
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>
2026-04-15 06:09:28 -06:00
..
2026-03-26 18:30:13 -06:00