harfbuzzjs icon indicating copy to clipboard operation
harfbuzzjs copied to clipboard

Add hb_font_funcs setter functions

Open madig opened this issue 2 years ago • 3 comments

Make hb_font_funcs_set_* accessible from the JavaScript side, with HB being able to call JavaScript functions the user passed in.

Had a quick look at this, but failed to understand the emscripten docs and various StackOverflow answers...

madig avatar Jan 05 '24 15:01 madig

We will need this, too, at some point. Specifically these:

  • hb_font_funcs_set_nominal_glyph_func
  • hb_font_funcs_set_glyph_h_advance_func
  • hb_font_funcs_set_glyph_v_advance_func
  • hb_font_funcs_set_glyph_v_origin_func

I am brand new to this project (although I have used and contributed to the equivalent parts of uharfbuzz), and hope to find my way so I can contribute.

In the meantime, some guidance about how to approach this would be very welcome.

justvanrossum avatar Mar 17 '24 07:03 justvanrossum

You can see an example of setting drawfuncs here: https://github.com/aliftype/rana-kufi/blob/99f9ba560e3c4a6d858d2b9d2c807466fb975c49/docs/app/HarfBuzz.js#L116

khaledhosny avatar Mar 23 '24 20:03 khaledhosny

See #97

khaledhosny avatar Mar 24 '24 03:03 khaledhosny