Commit Graph
20899 Commits
Author SHA1 Message Date
Khaled Hosny a243dcb5c4 [ci] Fix docs deploy
We now have a subdir (hb-gpu-demo) so  needs .
2026-04-01 15:05:28 +02:00
Khaled Hosny da69b6585c 14.0.0 14.0.0 2026-04-01 14:54:05 +02:00
Behdad Esfahbod 4b2bce0d74 [gpu] Disable vsync in --bench mode
Pre-type 'v' before zoom/fullscreen/animate so that
benchmarking measures uncapped frame rate.

Assisted-by: Claude <noreply@anthropic.com>
2026-03-31 19:32:07 -06:00
Behdad Esfahbod 90e2f5f8b9 [docs] Update vector and subset library logos
New artwork from hb-libs2.png.

Assisted-by: Claude <noreply@anthropic.com>
2026-03-31 19:16:46 -06:00
Behdad Esfahbod 5d24cb5bf3 [gpu] Add --bench option for automated benchmarking
Implies --demo and --type '30=f ' (zoom 30x, fullscreen,
animate).  Quits automatically after 3 fps reports.

Uses a GOption parse callback so --demo is set early enough
for the default font/text machinery.

Assisted-by: Claude <noreply@anthropic.com>
2026-03-31 16:25:05 -06:00
Behdad Esfahbod 6c1bd94816 [gpu] Add --type / -T option to replay keystrokes on startup
Allows simulating keyboard input at launch, e.g. -T '30= f'
zooms 30x, toggles fullscreen and starts animation.

Assisted-by: Claude <noreply@anthropic.com>
2026-03-31 16:12:25 -06:00
Behdad Esfahbod 355bd4b011 Tweak logos 2026-03-31 11:31:42 -06:00
Behdad EsfahbodandClaude Opus 4.6 be79d54265 [docs] Point to GitHub README for overview, clarify this is API reference
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 00:39:15 -06:00
Behdad EsfahbodandClaude Opus 4.6 c68696c4fa [docs] Update docs opening paragraph
Mention subsetting, rasterization, GPU, and platform integrations.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 00:34:24 -06:00
Behdad EsfahbodandClaude Opus 4.6 30ed85024d [docs] Add library logos to docs front page
Show subset, raster, vector, GPU logos inline at 64px
next to the main HarfBuzz logo.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 00:31:59 -06:00
Behdad EsfahbodandClaude Opus 4.6 2a31d1c745 [docs] Add per-library logos
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 00:22:06 -06:00
Behdad EsfahbodandClaude Opus 4.6 9705be1315 Remove HB_NO_VAR_COMPOSITES and HB_NO_VAR_HVF from HB_MINI
These should not be disabled in HB_MINI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 22:36:31 -06:00
Behdad EsfahbodandClaude Opus 4.6 94be1485ae [gpu] Use HB_TINY for web demo builds
HB_TINY = HB_LEAN + HB_MINI + HB_OPTIMIZE_SIZE_MORE.

WebGL: 635KB → 351KB (-45%)
WebGPU: 655KB → 371KB (-43%)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 22:35:10 -06:00
Behdad EsfahbodandClaude Opus 4.6 7dda04c95e [docs] Reorganize README libraries into Core and Experimental
Move raster, vector, GPU to Experimental. Remove hb-fontations
and hb-harfrust from the integration list.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 22:31:50 -06:00
Behdad EsfahbodandClaude Opus 4.6 73616f9808 [gpu] Drop HB_NO_VAR override now that draw works without gvar
WebGL: 513KB → 478KB, WebGPU: 533KB → 498KB.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 22:23:49 -06:00
Behdad EsfahbodandClaude Opus 4.6 e96cbf4a12 [gpu] Shrink web demo WASM with HB_LEAN
Add config.h with HB_LEAN and config-override.h to re-enable
draw, metrics, and variable font support. Strips color, paint,
math, bitmap, deprecated APIs, and other unused features.

WebGL: 635KB → 513KB (-19%)
WebGPU: 655KB → 533KB (-19%)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 22:18:06 -06:00
Behdad EsfahbodandClaude Opus 4.6 664085f0ae Remove HB_NO_OT_SHAPE_FRACTIONS from HB_LEAN
Fractions shaping should never be disabled.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 22:17:34 -06:00
Behdad Esfahbod 4d8aec2d3f Revert "[gpu] Hint --demo when no font file is provided"
This reverts commit 452f742628.
2026-03-30 21:00:03 -06:00
Behdad EsfahbodandClaude Opus 4.6 452f742628 [gpu] Hint --demo when no font file is provided
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:59:48 -06:00
Behdad EsfahbodandClaude Opus 4.6 c332f7210f [docs] Add hb-raster and hb-vector to README tools table
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:56:59 -06:00
Behdad EsfahbodandClaude Opus 4.6 b2cac8f6f0 [docs] hb-gpu is a tool, not just a demo
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:55:31 -06:00
Behdad EsfahbodandClaude Opus 4.6 b26f1a8bc1 [docs] Rename "Core libraries" to "Libraries", update NEWS
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:48:15 -06:00
Behdad EsfahbodandClaude Opus 4.6 491cd26af3 [docs] Remove "complex" from text shaping description
HarfBuzz shapes all text, not just complex scripts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:41:59 -06:00
Behdad EsfahbodandClaude Opus 4.6 7caa958327 [docs] Expand Name section with etymology and logo description
Dictionary-style definition with Persian etymology, calque
explanation, noun/adjective meanings, and logo description.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:39:34 -06:00
Behdad EsfahbodandClaude Opus 4.6 7a95244bf3 [docs] Simplify Download section in README
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:34:57 -06:00
Behdad EsfahbodandClaude Opus 4.6 bcdede4464 [docs] Remove Wine note from README
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:33:36 -06:00
Behdad EsfahbodandClaude Opus 4.6 7e9a3f11b7 [docs] Expand README intro and Users section
Add "ffmpeg of text shaping" positioning, "shapes majority of
text on modern screens" claim, expanded user list, Wine footnote.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:33:08 -06:00
Behdad EsfahbodandClaude Opus 4.6 a8bc4255f0 [docs] Merge README intro with Overview section
Remove redundant opening paragraph, combine heading with the
component overview. Keep OpenType/AAT mention inline.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:24:49 -06:00
Behdad EsfahbodandClaude Opus 4.6 4e14e033c1 [docs] Remove inaccurate conference mention from README
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:19:43 -06:00
Behdad EsfahbodandClaude Opus 4.6 9106c54b02 [docs] Add "HarfBuzz at 20!" presentation to README
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:19:12 -06:00
Behdad EsfahbodandClaude Opus 4.6 fddaba2132 [docs] Add design philosophy to README
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:17:51 -06:00
Behdad EsfahbodandClaude Opus 4.6 541ed9ab3f [docs] Add NEWS entry for 14.0.0
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:13:37 -06:00
Behdad EsfahbodandClaude Opus 4.6 0d2131a52b [docs] Simplify hinting note in README
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:08:26 -06:00
Behdad EsfahbodandClaude Opus 4.6 df92bdb395 [docs] Add Overview section to README
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>
2026-03-30 20:07:48 -06:00
Behdad EsfahbodandClaude Opus 4.6 14effc302a [gpu] Add hb_gpu_darken() to all shader languages
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>
2026-03-30 19:49:42 -06:00
Behdad EsfahbodandClaude Opus 4.6 f99f91a658 [gpu] Update Metal stem darkening to pow(2, brightness-0.5)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 19:26:51 -06:00
Behdad EsfahbodandClaude Opus 4.6 9e2828622c [gpu] Use pow(2, brightness-0.5) for stem darkening
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>
2026-03-30 19:25:31 -06:00
Behdad EsfahbodandClaude Opus 4.6 b9e864e9e7 [gpu] Link to live web demo from API docs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 19:04:07 -06:00
Behdad Esfahbod 9e0d8d48c4 Revert "Revert "[webgpu] Align touch handoff with WebGL fixes""
This restores commit 00a3475ce.

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
2026-03-30 18:40:40 -06:00
Behdad Esfahbod a7367b65e2 Revert "[webgpu] Align touch handoff with WebGL fixes"
This reverts commit 00a3475ce.

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
2026-03-30 18:39:20 -06:00
Behdad Esfahbod 00a3475ce0 [webgpu] Align touch handoff with WebGL fixes
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
2026-03-30 18:36:54 -06:00
Behdad Esfahbod 2c15cb9123 [web] Continue pan after pinch handoff
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
2026-03-30 18:25:42 -06:00
Behdad Esfahbod 7c3c313bbc [web] Fix pinch to single-finger handoff
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
2026-03-30 18:22:03 -06:00
Behdad Esfahbod 4ebb454061 Revert "[gpu] Sync cursor position on 2→1 touch transition"
This reverts commit d44b0958fa.
2026-03-30 18:18:15 -06:00
Behdad EsfahbodandClaude Opus 4.6 d44b0958fa [gpu] Sync cursor position on 2→1 touch transition
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>
2026-03-30 18:17:34 -06:00
Behdad Esfahbod 3d18a8e0c8 Merge pull request #5884 from harfbuzz/docs-ci
[gpu] Dedicated docs + web demo CI workflow
2026-03-30 18:06:42 -06:00
Behdad EsfahbodandClaude Opus 4.6 d4c659eca1 [gpu] Add help2man to docs CI
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 17:49:45 -06:00
Behdad EsfahbodandClaude Opus 4.6 1612415265 [gpu] Disable chafa in docs CI
Not needed for docs/web demo build.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 17:49:27 -06:00
Behdad EsfahbodandClaude Opus 4.6 8bc79a6beb [gpu] Dedicated docs + web demo CI workflow
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>
2026-03-30 17:41:38 -06:00
Behdad Esfahbod 2e4da9e9ad Merge remote-tracking branch 'origin/main' 2026-03-30 17:39:47 -06:00