simoncozens/crowbar

The rendering sometimes does not match the serialized buffer

Closed this issue · 4 comments

Using Amiri-Regular.otf and the text ربها.

  • start lookup 78: The serialization is the same as end lookup 11 above it, but the rendering is different (it shows what would happen a few lookups below).
  • The 2nd end lookup 77, the serialization is different from the end lookup 77 above it, but the rendering is the same.
  • start lookup 197 shows the same rendering as end lookup 198 though the serialization is different.

Yeah, I don't think this can be fixed until harfbuzz/harfbuzz#2468 is done. Crowbar uses my hacky patch to extract descended lookup information, but you can't partially shape those correctly because they really are happening in the middle of an application.

I don’t know how you do the buffer rendering, but I was assuming that you take the serialized data and render it, so at least the textual information and the image would show the same thing.

I don't just render stuff as it comes out of the GSUB table; I tell Harfbuzz to reject the current lookup and all others in the current stage, so that it can then process lookups in the next stage. (I want this so you get correct positioning - e.g. mark positioning and cursive attachment - even if you don't do all the substitutions.) But you can only reject a lookup after it completely finishes.

I see, which explains why I was getting mark positioning before GPOS and was confused.