rustybuzz icon indicating copy to clipboard operation
rustybuzz copied to clipboard

UNSAFE_TO_CONCAT inaccessible?

Open leddoo opened this issue 6 months ago • 2 comments

the UNSAFE_TO_CONCAT glyph info flag does not appear to be accessible to users of the library.

for UNSAFE_TO_BREAK, there is a method on hb_glyph_info_t. there is no such method for UNSAFE_TO_CONCAT.

i'm not entirely sure why the mask field of hb_glyph_info_t and the pub mod glyph_flag in hb/buffer.rs are private. but this also means that SAFE_TO_INSERT_TATWEEL is inaccessible, as there is no accessor method for that either.

maybe i'm missing something, but https://docs.rs/rustybuzz/latest/rustybuzz/?search=UNSAFE_TO_CONCAT only lists rustybuzz::BufferFlags::PRODUCE_UNSAFE_TO_CONCAT. which suggests to me that the feature is usable. i tried it with some sample text, and the output does seem reasonable.

leddoo avatar Jun 06 '25 16:06 leddoo

If I remember correctly I added the UNSAFE_TO_CONCAT and SAFE_TO_INSERT_TATWEEL as part of the backporting process, but it's definitely possible that I forgot to expose them properly. So it's most likely just by accident.

LaurenzV avatar Jun 06 '25 16:06 LaurenzV

This also affects harfRuzz.@dfrg

behdad avatar Jun 06 '25 17:06 behdad