Add a "text" button that opens a modal textarea with the current
text. Apply sends new text to WASM, flushing the glyph cache and
atlas. Custom text is preserved across font changes.
Also adds demo_font_clear_cache() and demo_atlas_clear() for
flushing state without full destroy/recreate.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a font button and drag-and-drop support to the web demo.
When a user provides their own .ttf/.otf font, the glyph cache
and atlas are flushed and the display is rebuilt with English-only
text (since the font may not support Persian).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Make scroll zoom proportional to delta (pow(STEP, yoffset))
instead of fixed steps. Add JS pinch-to-zoom handler that
translates two-finger touch to wheel events with a dead zone
to prevent jitter.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Web build using Emscripten + WebGL2 with HB_GPU_ATLAS_2D mode.
Touch support: drag to pan, tap to toggle animation.
FPS counter overlay. Viewport meta for mobile.
Fix cursor position on first touch by querying glfwGetCursorPos
in mouse_func. Left click/tap also toggles animation.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>