Standard Ligature issue in FC13

Yes, I know, I have an old and outdated version of Font Creator. Still, I wonder if the following is an old (current) bug, or just something I’m doing wrong. In the code below, rendering appears correct in the OTD window. However, web browser testing reveals an error. According to the following code, an entry of -qqqq should reveal -Qq. Yet, in a web browser, I require -qqqqq (5 q’s) to get -Qq.

My ligature lookup has two subs: one for 3 q’s and one for 4 q’s. The ChainingContext is only seeking one of those rules (3 q’s). Why is the web browser test looking up 4 q’s anyway? I also tested this in a text app with the same resulting error.

Appreciate your thoughts.


script latn {
feature StandardLigatures1;
}

feature StandardLigatures1 liga {
lookup “ChainingContext (qqq for Q)”;
}

lookup “ChainingContext (qqq for Q)” {
context (hyphen) q q q;
sub 0 “Ligature1 (qqq for Q)”;
}

lookup “Ligature1 (qqq for Q)” {
sub q q q q → Q;
sub q q q → Q;
}
OTD rendering.png

It seems harfbuzz does not respect input sequences and goes beyond it in processing the Ligature lookup. As per the specification, the sequence lookup can be specified only for glyphs in the input sequence.

In the example you provided, the line:
sub q q q q → Q;
is never used, so could be removed. That solves the issue, but maybe your actual font has more complex contextual lookups that are affected by the issue.

I suggest you report the issue here:

https://github.com/harfbuzz/harfbuzz

Thank you, Erwin,

Indeed, the reason I have both 3 and 4 q sub rules in the ligature lookup is that there are other contextual rules in the font that access them. I would be surprised if harfbuzz would correct this issue immediately, but I will look into posting the issue there just the same. It seems my only recourse, at the moment, is to create separate ligature lookups for each the two sub rules in question.

Thanks once again.

Yes, it is always wise to report such issues.