[HarfBuzz] [p-c] Perso-Arabic symbols for "year"
Behdad Esfahbod
behdad.esfahbod at gmail.com
Wed May 30 22:00:31 PDT 2012
On 2012-05-28, at 10:29 PM, Khaled Hosny <khaledhosny at eglug.org> wrote:
> On Mon, May 28, 2012 at 07:50:55PM -0400, Behdad Esfahbod wrote:
>> [CC'ing Khaled and HarfBuzz list]
>>
>>>
>>>
>>>
>>
>> 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² :)
Reporting back from the Adobe communication thread:
So, apparently Adobe meant the backtrack sequence to be in logical
order, not reversed. Combining this with Khaled's observation of the
font working can only suggest that Fontforge is producing backtrack
table in reverse. Fixing that will break all fo ts relying on that
behavior of Fontforge. Khaled is to investigate more to figure out how
to proceed.
behdad
>> I like how Scheherazade SIL implements this BTW.
>
> I wanted to do it with as fewer glyph variants as possible (was then
> obsessed with smaller file size) and Scheherazade’s didn’t work with
> LibreOffice last time I checked.
>
>>> Finally, can anyone make any sense of the "hacks" recommended by SIL in this
>>> page in terms of what's happening with the Bidi behaviour?
>>>
>>> http://scripts.sil.org/cms/scripts/page.php?item_id=ArabicFonts#b78d09ff
>>>
>>> Do they work?
>>
>> That's what I was explaining before. Two things:
>>
>> 1. You want to force the enclosing sign into the same bidi run as the numbers.
>> Because, as I said, before Unicode 5.1 it was classified as an Arabic Letter
>> and hence RTL, whereas digits are LTR.
>
> AFAIK this is no longer an issue, it has been fixed in later Unicode
> releases and an up to date software stack should do just fine with no
> hacks.
>
> Regards,
> Khaled
>
> ¹ only end of ayah not the others, but since they all share the same
> lookup, I suspect it is a Unicode properties issue on FireFox side.
>
> ² The last Amiri release had a thinko that didn’t exist in previous
> release which breaks the positioning of the digits, but the substation
> is OK, and is already fixed on master.
More information about the HarfBuzz
mailing list