You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not an issue. Just a question about the library. I am hoping @RazrFalcon would help.
As far as I understand the type and the library, the iterator for LazyOffsetArray16is not fused, and can be called multiple times even after the the first None. Yet the usages I have come across in rustybuzz don't do that.
My question is why the data is structured that way. Why is the inner array a LazyArray of optional offsets if the iterator is supposed at the first null found and that's it.
in other words why is the offsets array a LazyArray16(Option<Offset16>) and not LazyArray16(Offset16) ?
Hi! I wrote this code like 5-6 years ago, so I would not be able to provide much more info that already mentioned in the comments.
Reading the code I do see that it breaks the Rust Iterator convention. Not sure how bad it is. As long as the caller expects this - it's fine, but it should probably return Option<Option<Self::Item>>.
You can try fixing it. Not sure how much changed to rustybuzz it would require.
As for the TrueType itself, it does explicitly states that some offsets can be NULL/0:
Array of offsets to SequenceRuleSet tables, from beginning of SequenceContextFormat1 table (offsets may be NULL).
Activity
RazrFalcon commentedon Jan 13, 2026
Hi! I wrote this code like 5-6 years ago, so I would not be able to provide much more info that already mentioned in the comments.
Reading the code I do see that it breaks the Rust Iterator convention. Not sure how bad it is. As long as the caller expects this - it's fine, but it should probably return
Option<Option<Self::Item>>.You can try fixing it. Not sure how much changed to rustybuzz it would require.
As for the TrueType itself, it does explicitly states that some offsets can be NULL/0: