Providing HarfBuzz shaping library for client/server side JavaScript projects.
See the demo here.
- Install clang, lld and git
./build.sh
Download the pack from releases tab of the project, or just download the demo page (the demo source is in gh-pages branch).
npx pad.js
- Open
http://127.0.0.1/examples/hbjs.example.html
orhttp://127.0.0.1/examples/nohbjs.html
(cd examples && node hbjs.example.node.js)
Even the fact we provide a tiny wrapper around the main functionalities of
harfbuzz, it's easy to use other parts see example/nohbjs.js
to see how,
but you may need a custom build.
Can be added with npm i harfbuzzjs
or yarn add harfbuzzjs
, see the examples for
how to use it.
File a bug and mention your usecase.
See harfbuzz port inside emscripten
and emscripten-ports/HarfBuzz, basically all you need is to use
-s USE_HARFBUZZ=1
in your build.
Optionally you can install binaryen
and use wasm-opt
like:
wasm-opt -Oz hb.wasm -o hb.wasm
binaryen
also provides wasm-dis
which can be used for,
wasm-dis hb.wasm | grep export
wasm-dis hb.wasm | grep import
with that you can check if the built wasm file only exports things you need and doesn't need to import anything, as usual with wasm files built here.