From my understanding var result = buffer.json(font);
should return an array of https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb_glyph_info_t
but the current implementation is only returning clusters without the original unicode codepoints
There is other unused data inside of infos I thought it might be in
var infosPtr = exports.hb_buffer_get_glyph_infos(ptr, 0);
var infosPtr32 = infosPtr / 4;
var infos = heapu32.subarray(infosPtr32, infosPtr32 + 5 * length);
but none of this additional unreturned data seems to be what I'm looking for.
I'm looking to use the unicode codepoints from the original buffer to handle fallbacks for glyphs that are not available in the font.
Currently the glyphId is returned as 0 for all of these cases which isn't very helpful.
I'm open to alternative ways of handling this if you all have better ideas for ways to connect the original text with the shaped output.
From my understanding
var result = buffer.json(font);should return an array of https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb_glyph_info_t
but the current implementation is only returning clusters without the original unicode codepoints
There is other unused data inside of
infosI thought it might be inbut none of this additional unreturned data seems to be what I'm looking for.
I'm looking to use the unicode codepoints from the original buffer to handle fallbacks for glyphs that are not available in the font.
Currently the glyphId is returned as 0 for all of these cases which isn't very helpful.
I'm open to alternative ways of handling this if you all have better ideas for ways to connect the original text with the shaped output.