Closed LaurenzV closed 4 months ago
[GSUB] Support SingleSubst in get_glyph_alternates Link I guess not relevant? seems more like an API thing, not actually relevant for shaping
Yep.
[syllabic] Better fix for previous issue Link unsure about this one, our skippy iter only has syllable but not a bool "per_syllable">
Looks like it was added in v4: https://github.com/harfbuzz/harfbuzz/commit/044d7a06db552e1564b8575f4d23798f009d9dde We should add it too. Strange that it works at all without it...
[PairPosFormat2] Micro-optimize and don't kern if class2=0 Link not sure I can really port this... I remember we ported this in the past and it was a huge pain because ttf-parser doesn't give that much low-level access
Let's ignore.
[Ligature] Speed up Link do we need to port this since it's behind a compilation flag? probably easier to ignore it
Looks like it was changed quite a bit in the master. Nice to have, but can leave it for later. Let's add a comment/todo in Rust code explaining why it is different.
[GPOS] Optimize iterator reset Link we dont have the whole iter thing with init and reset right?
No idea... Seems like we never reset a skipping iterator.
Hm, yeah there is definitely something fishy... So this per_syllable
thing is only used in the set_syllable
function, which in turn is only used in the reset
function of the iterator... which for some reason, we don't have, along with init
. I searched for its usages, and there are indeed differences in how we interact with the iterator throughout the code. Not sure why it is that way. I guess for now I'll just add a TODO.
There are some more changes regarding how skippy iterators are used, so I'll try to align it in the next PR.
Got it. I remember it was problematic to implement skipping iterator. Probably because of borrow checker. So no surprises it is different.
But per_syllable
was still added after my initial port.
I can see why now... the context itself contains a skipping iterator iter_input
, and the skipping iterator itself contains a reference to the same context, so it's a circular reference... Yeah this seems pretty hard to deal with. :/
We should start sending patches to harfbuzz 👀
A couple of points I wasn't sure about / need to discuss, but other than that nothing crazy, luckily: