harfbuzz / harfbuzzjs

Providing HarfBuzz shaping library for client/server side JavaScript projects
https://harfbuzz.github.io/harfbuzzjs/
Other
197 stars 34 forks source link

fribidi_log2vis WASM Example? #50

Closed jfuehner closed 2 years ago

jfuehner commented 2 years ago

Hi! The FriBidi project has a convenience function fribidi_log2vis.

Would there be a similar example of using the fribidi_log2vis function in javascript/wasm similar to this example?

Thanks!

chearon commented 2 years ago

Are you looking for the code on the gh-pages branch here?

https://github.com/harfbuzz/harfbuzzjs/blob/43b28d7c7d6bc1accc83e482b3c57dd3449cb8e7/fribidi/index.html#L38-L40 You would need to add the line -Wl,--export=fribidi_log2vis \ to fribidi.js/build.sh (and rerun it) to be able to call exports.fribidi_log2vis, but the rest is just normal JS<->WASM function/pointer calls.

khaledhosny commented 2 years ago

FriBiDi was removed in #59, we would like to concentrate on HarfBuzz in this repository.