On 13-04-16 05:11 PM, Khaled Hosny wrote: > > The aya mark issue we discussed on the Persian computing list few months > ago; basically when script is Arabic, a string
Right. I remember that. > <aya><digit¹><digit²><digit³> > > Will be matched in reverse order by HarfBuzz, unlike Uniscribe or even > HarfBuzz itself when using setting script to Latin, even though the > output will be left to right in all cases. Correct. That's a deficiency of the OpenType lookup model that we don't have a clear answer to right now. > Anyway, I rewrote that code and it is now less complex and saves around > 25% overall (though now it is broken for ICU LE, but I can’t care less). > Dropping the duplications saves another 5% > > http://www.khaledhosny.org/files/tmp/amiri-regular.ttf > > Other than that I see no obvious way to decrease the number of lookups, > lumping a dozen or so of calt and kern lookups together made things > worse actually. Interesting. Thanks for trying. I have deeper ideas that I will explore, to make matching tens of lookups much faster... In the mean time, I'll study the Amiri lookups to see if there's a faster way to do them. Here's an idea that may or may not help speed the lookups up: instead of listing many substitutions / positionings directly, add a couple contextual lookups, one set for the subtending marks themselves, one set for the digits, then in the recursive lookups do the heavy lifting. The thing to know here is that, as far as I understand, the recursive lookup is not limited to just modifying what matched in the contextual lookup, but can freely look ahead / back and modify more than the current glyph. The recursed lookup can itself be contextual. HTH, behdad > Regards, > Khaled > -- behdad http://behdad.org/ _______________________________________________ HarfBuzz mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/harfbuzz
