Export for GlyphExtents and UnicodeBuffer internals
- Dominant language
- Rust
- Stars
- 301
- Forks
- 26
- Avg merge
- 10h 11m
- Merged PRs (30d)
- 43
Description
Hello
I am trying to redo the wasm shaper for HarfRust but as an external crate on top of it and `skrifa`. I am still on the phase of trying to port the code and I have not kept up with the changes from rustybuzz to HarfRust.
A few roadblocks are the following:
1. Getting the GlyphExtents data: One of the functions require Glyph Extents. This does not seem to be exposed. It *might* be just as simple as adding it to a `pub use` to `lib.rs`.
2. Getting the internals of `UnicodeBuffer`. This needs to be reset this from raw data coming from the module. IF there is a better way to do this I am all ears.
```
store_data.buffer.len = buffer.length as usize;
store_data.buffer.info.clear();
store_data.buffer.info.extend_from_slice(bytemuck::cast_slice(
&mem_data[buffer.info as usize..buffer.info as usize + array_length],
));
store_data.buffer.pos.clear();
store_data.buffer.pos.extend_from_slice(bytemuck::cast_slice(
&mem_data[buffer.position as usize..buffer.position as usize + array_length],
));
```
3. Last and least: `hb_font_t`, exported as `Shaper`, seems to have lost the inquiries about specific glyphs and tables. I am not quite sure how to access these. (I have not thought about this too much, and it might be as simple as just passing the `FontRef` from `read_fonts` separately.
Am I missing something obvious in regards to these points or are they something the crate can export?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.