Commit Graph
33 Commits
Author SHA1 Message Date
Behdad Esfahbod f222478bcc [wasm] Saturate Graphite positions
The standalone WebAssembly Graphite shaper mirrors the native backend
and had the same unchecked coordinate, cluster, and pen arithmetic.
Clamp backend values and saturate its signed position accumulation.

This is part of the complete position-overflow fix for issue #6151.

Testing: g++ -std=c++17 -Isrc -fsyntax-only src/wasm/graphite/shape.cc
Testing: meson test -C build --print-errorlogs

Assisted-by: Codex <codex@openai.com>
2026-08-12 18:27:23 -06:00
Simon Cozens eaa7e3c737 Allow WASM shaper code to access features (#6139)
* Add WASM API to wrap features

* Access features through WASM FFI
2026-08-04 13:56:18 -06:00
Khaled Hosny c650858c63 [graphite] Fix cluster advance width
Based on https://github.com/harfbuzz/harfbuzz/issues/4309#issuecomment-1624730406

Fixes https://github.com/harfbuzz/harfbuzz/issues/4309
2023-07-08 13:51:07 -04:00
Behdad Esfahbod d2fb583a5a [wasm-graphite] Fix advance signedness 2023-03-31 17:33:45 -06:00
Simon Cozens 0a16c60b42 [wasm-rust] Derive some friendly traits 2023-03-31 17:33:45 -06:00
Simon Cozens e78d8653ce [wasm-rust] panic if buffer_set_contents fails 2023-03-31 17:33:45 -06:00
Behdad Esfahbod 6aea77c643 [wasm-shape] Add (disabled) module support 2023-03-31 17:33:45 -06:00
Simon Cozens 7e397d8695 [wasm-rust] Fix shape parameters 2023-03-31 17:33:45 -06:00
Simon Cozens d942f72c2a [wasm-rust] Fix path 2023-03-31 17:33:45 -06:00
Simon Cozens 52b11546c8 [wasm-rust] Optional kurbo dependency 2023-03-31 17:33:45 -06:00
Behdad Esfahbod 4096115b48 [wasm-graphite] Export malloc/free
Makes the wasm-micro-runtime use these instead of internal heap.
2023-03-31 17:33:45 -06:00
Behdad Esfahbod b9d4758bf9 [wasm/graphite] Add commented out allocator export 2023-03-31 17:33:45 -06:00
Behdad Esfahbod 3c59943433 [wasm/graphite] Remove stale comment 2023-03-31 17:33:45 -06:00
Behdad Esfahbod 9b66e45481 [wasm/graphite] Remove unused variable
Wasm cannot export those?
2023-03-31 17:33:45 -06:00
Behdad Esfahbod 8215e70632 [wasm-graphite] Memory hygiene 2023-03-31 17:33:45 -06:00
Behdad Esfahbod d5d8fc046f [wasm/graphite] Include standard headers
Since we use emcc here.
2023-03-31 17:33:45 -06:00
Behdad Esfahbod 1f86890b75 [wasm/graphite] Typo 2023-03-31 17:33:45 -06:00
Behdad Esfahbod 918df8ccaf [wasm-api] Add glyph_outline_free 2023-03-31 17:33:45 -06:00
Behdad Esfahbod 7fff4a19ad [wasm-api] Reuse allocation in font_copy_glyph_outline 2023-03-31 17:33:45 -06:00
Behdad Esfahbod 6746ca4ae2 [wasm] Minor remove undefine function 2023-03-31 17:33:45 -06:00
Behdad Esfahbod f2d227ad9f [wasm-api] Respect existing blob allocation in face_copy_blob 2023-03-31 17:33:45 -06:00
Behdad Esfahbod e7540043de [wasm-api] Make buffer_copy_contents reuse contents 2023-03-31 17:33:45 -06:00
Behdad Esfahbod 65966e0c3d [wasm-api] Add font_copy_glyph_outline 2023-03-31 17:33:45 -06:00
Simon Cozens 92a57b4b4a [wasm-rust] update font_copy_table API 2023-03-31 17:33:45 -06:00
Simon Cozens db789eacb4 [wasm-rust] Docs and API update 2023-03-31 17:33:45 -06:00
Behdad Esfahbod 2004528cf8 [wasm-api] Change face_copy_table to return success 2023-03-31 17:33:45 -06:00
Simon Cozens 83b9c34f0b [wasm] Add rust example 2023-03-31 17:33:45 -06:00
Behdad Esfahbod 28a7c1f932 [wasm-api] Rename face_reference_table to face_copy_table 2023-03-31 17:33:45 -06:00
Behdad Esfahbod b5b577f29f [wasm-api] Make buffer_copy_contents return success 2023-03-31 17:33:45 -06:00
Behdad Esfahbod 1023a80d39 [wasm] Fix up samples 2023-03-31 17:33:45 -06:00
Behdad Esfahbod 4ad659a608 [wasm] Move wasm-graphite 2023-03-31 17:33:45 -06:00
Simon Cozens 514a8d58d8 [wasm-api] Add ergonomic Rust interface 2023-03-31 17:33:45 -06:00
Simon Cozens 74deaa9e78 [wasm-api] Restructure samples/libraries 2023-03-31 17:33:45 -06:00