Quick reference map of libraries, integration backends,
amalgamated sources, and command-line tools for integrators.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Library function for stem darkening: pow(2, brightness-0.5)
scaled by ppem. Added to GLSL, MSL, WGSL, HLSL with consistent
brief docs. Demo shaders now call the library function.
Section docs in hb-gpu.cc updated with usage example.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace boolean light_on_dark with continuous brightness-driven
exponent. pow(2, b-0.5) gives sqrt(2)≈1.414 for white text
(thin) and 1/sqrt(2)≈0.707 for black text (fatten), perfectly
symmetric around 1.0 at 50% gray.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The WebGPU touch path was still using the older gesture state machine.
It handled 3->2 reseeding, but it did not track whether a pinch was
active and it had no explicit 2->1 single-finger pan handoff.
Carry over the proven transition rules from the WebGL path without
changing desktop input handling: track pinch-active and synthetic
single-pan state, preserve the 3->2 reseed, and continue pan after a
pinch when one finger remains. touchcancel now also clears those touch
states consistently.
Testing:
- source /home/behdad/emsdk/emsdk_env.sh >/dev/null &&
EM_CACHE=/tmp/emscripten-cache ./util/gpu/web/build.sh
- source /home/behdad/emsdk/emsdk_env.sh >/dev/null &&
EM_CACHE=/tmp/emscripten-cache ./util/gpu/web/build-webgpu.sh
Assisted-by: OpenAI Codex
The previous fix stopped the 2->1 jump by swallowing the pinch-ending
touchend and seeding a synthetic left-button press at the remaining
finger. But subsequent one-finger motion was still left to the browser,
which does not reliably resume mouse emulation mid-gesture.
Track an explicit single-finger pan mode after the pinch handoff, route
its touchmove events to synthetic mousemove, and end it with a
gesture-cancelled synthetic mouseup on lift or touchcancel.
Testing:
- source /home/behdad/emsdk/emsdk_env.sh >/dev/null &&
EM_CACHE=/tmp/emscripten-cache ./util/gpu/web/build.sh
- source /home/behdad/emsdk/emsdk_env.sh >/dev/null &&
EM_CACHE=/tmp/emscripten-cache ./util/gpu/web/build-webgpu.sh
Assisted-by: OpenAI Codex
The WebGL touch path only tracked the initial 3->2 reseed with
skipNextPinchMove. Once a real pinch was underway, the later 2->1
transition stopped being treated as a gesture handoff and fell back
into the browser/GLFW single-touch path.
Track pinch-active state explicitly, swallow the pinch-ending touchend,
and hand single-finger pan off from the remaining touch by syncing the
cursor before synthesizing mousedown. This keeps the 3->2->1 sequence
from jumping the view when the second finger lifts.
Testing:
- source /home/behdad/emsdk/emsdk_env.sh >/dev/null &&
EM_CACHE=/tmp/emscripten-cache ./util/gpu/web/build.sh
- source /home/behdad/emsdk/emsdk_env.sh >/dev/null &&
EM_CACHE=/tmp/emscripten-cache ./util/gpu/web/build-webgpu.sh
Assisted-by: OpenAI Codex
Dispatch mousemove before mousedown when transitioning from
pinch to single-finger pan, so GLFW's cursor position matches
the remaining finger.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move docs generation and deployment from linux.yml to a new
docs.yml workflow. The new workflow also:
- Installs Emscripten
- Builds WebGL and WebGPU web demos
- Copies demo output to docs/html/hb-gpu-demo/
- Deploys everything to harfbuzz.github.io on tagged releases
Web demos will be available at harfbuzz.github.io/hb-gpu-demo/
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The generated gtk-doc site only shipped the existing logo assets, so
harfbuzz.github.io had no root favicon for browsers to discover.
Add a small 64x64 favicon.ico derived from the existing docs logo
and install it as a gtk-doc HTML asset so the Pages deployment
copies it to the site root.
Testing:
- meson test -C build
Assisted-by: OpenAI Codex
GPU library always builds (no deps). GPU demo controlled by
gpu_demo option (auto default). Only MSVC CI disables it
(GLEW wrap broken with -nodefaultlib). All other CIs install
GLEW/GLFW system packages.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Drop gpu_demo option. GLEW/GLFW use required:false — demo builds
when deps are found, skipped when not. Install GLEW/GLFW on all
CIs (Linux already had them, add to macOS and Rust). MinGW CI
uses wraps via --wrap-mode=default.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
GPU library is always built (no deps). GPU demo (hb-gpu) requires
GLEW/GLFW/GL and is controlled by gpu_demo option (auto by default).
When disabled, deps aren't even looked up — fixes MSVC pulling in
broken GLEW wrap. MinGW CI explicitly enables with -Dgpu_demo=enabled.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Prevents MSVC builds from pulling in GLEW wrap which fails
with -nodefaultlib (missing memset). MinGW CI explicitly
passes -Dgpu=enabled.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace manual CI download/install with meson WrapDB subprojects.
Meson automatically downloads and builds them when system deps
aren't found (--wrap-mode=default).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Ubuntu doesn't have libglew-mingw-w64-dev. Download GLEW source
and build with MinGW instead.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
build-win.sh assumes deps are present (like other deps).
The workflow downloads GLFW prebuilt binaries and installs
into the MinGW sysroot.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add --direct3d flag to hb-gpu via gpu-output.hh
- Download GLFW prebuilt for MinGW in build-win.sh
- Add libglew-mingw-w64-dev to CI packages
- Enable -Dgpu=enabled in cross-build
- hb-gpu.exe ships in the Windows zip with D3D11 support
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Wire demo_renderer_create_d3d11 into gpu-output.hh with --direct3d
flag. Add to meson build conditionally on Windows with d3d11 and
d3dcompiler libraries. Remove standalone D3D11 demo (superseded).
hb-gpu.exe --demo --direct3d now works under Wine.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add _USE_MATH_DEFINES before <cmath> includes on Windows.
hb-gpu.exe now cross-compiles successfully with MinGW.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Implements demo_renderer_t using D3D11, same pattern as Metal.
Uses GLFW for windowing (GLFW_NO_API + glfwGetWin32Window).
Compiled conditionally with #ifdef _WIN32.
Not yet wired into gpu-output.hh or build system — needs
GLFW and GLib for MinGW, which are available on Fedora.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The tool now requires a font file argument by default, like
other hb-* tools. Pass --demo to use the built-in demo font
and text. --metal is now a proper GLib option instead of manual
argv parsing. Window title changed to "HarfBuzz GPU".
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Draw a semi-transparent fullscreen quad with the background color
each frame instead of clearing, so previous frames fade gradually.
Uses a tiny passthrough shader and attributeless triangle.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Skip glClear when trail is on — previous frames stay visible,
creating a paint/stamp effect during animation and interaction.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Double-left-click and double-right-click both reset view.
Middle-click reset also still works. Updated help text.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Second click within 300ms undoes the first click's animation
toggle and resets the view. Works across all backends.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
GLFW doesn't see the remaining finger after a swallowed pinch,
so synthesize a mousedown to start drag tracking.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
WebGL mobile currently commits a tap on touchstart, then the second
tap in a double-tap zoom has to undo that animation toggle. This
makes tap and double-tap drag compete and can start animation before
gesture intent is clear.
Track a pending single tap until touchend, suppress the synthetic
click toggle on release, and only fire the animation toggle after the
double-tap timeout expires. A second tap now cancels that pending
toggle and claims double-tap zoom directly.
Testing:
- source /home/behdad/emsdk/emsdk_env.sh >/dev/null &&
EM_CACHE=/tmp/emscripten-cache ./util/gpu/web/build.sh
- source /home/behdad/emsdk/emsdk_env.sh >/dev/null &&
EM_CACHE=/tmp/emscripten-cache ./util/gpu/web/build-webgpu.sh
Assisted-by: OpenAI Codex