[HarfBuzz] [p-c] Perso-Arabic symbols for "year"
Behdad Esfahbod
behdad at behdad.org
Mon May 28 23:19:41 PDT 2012
On 05/28/2012 10:29 PM, Khaled Hosny wrote:
>
>> This block:
>>
>> feature calt {
>> sub @YearSign @Digits' lookup digit2medium;
>> sub @Digits.medium @YearSign @Digits' lookup digit2medium;
>> sub @Digits.medium @Digits.medium @YearSign @Digits' lookup digit2medium;
>> sub @Digits.medium @Digits.medium @Digits.medium @YearSign @Digits' lookup digit2medium;
>> } calt;
>>
>> Looks completely wrong to me in that it matches the backtrack sequence in the
>> wrong order. Ie, from what I understand, and I can be totally wrong, it
>> should have lines like this:
>>
>> sub @YearSign @Digits.medium @Digits.medium @Digits' lookup digit2medium;
>>
>> instead of this:
>>
>> sub @Digits.medium @Digits.medium @YearSign @Digits' lookup digit2medium;
>
> AFAIK the backtrack coverage has to be in the reverse order, if I do as
> you suggest, only first digit will be matched. This have been tested
> with FireFox¹ (hb-ng), Pango (hb-old), LibreOffice (ICU) and MS Word
> (Uniscribe), so I think it is correct² :)
Right. That was my first guess. I looked in Scheherazade to confirm but it
doesn't use more than one backtrack glyph for these characters so that didn't
help. I then checked Adobe's documentation:
https://www.adobe.com/devnet/opentype/afdko/topic_feature_file_syntax.html
It never defines how backtrack sequences are matched, but this example made me
think that it's matched in the straight order:
ignore substitute f [a e] d'
ignore substitute a d' d;
substitute [a e n] d' by d.alt;
It's the first line that suggests that it's trying to match and ignore 'fad'
and 'fed' as opposed to 'afd' and 'efd'.
Now, I know that in the OT tables backtrack is encoded in reverse order, so
this can quite possibly be a documentation issue on Adobe's side.
I don't seem to have the Adobe 'fea' parser source code to check, so I will
report this to Adobe in a separate thread and CC you.
behdad
More information about the HarfBuzz
mailing list