[HarfBuzz] Amiri and OpenType performance

Khaled Hosny khaledhosny at eglug.org
Tue Apr 16 14:11:19 PDT 2013


On Tue, Apr 16, 2013 at 04:19:56PM -0400, Behdad Esfahbod wrote:
> On 13-04-15 06:21 PM, Khaled Hosny wrote:
> > On Mon, Apr 15, 2013 at 10:37:05PM +0200, Khaled Hosny wrote:
> >> On Mon, Apr 15, 2013 at 04:20:09PM -0400, Behdad Esfahbod wrote:
> >>> BTW, disabling 'kern' makes it more than twice faster!
> >>
> >> Aha. Looks like my support for subtending marks is totally inefficient,
> >> it amounts for half the processing time! I guess I know where to look
> >> now.
> > 
> > Half of the kern overhead is from the duplication to support subtending
> > marks in both HarfBuzz and Uniscribe (I tried using ltra/rtla but that
> > doesn’t work). I’m still thinking of a more efficient way to do it.
> 
> Can you elaborate a bit?  I like to better understand this, and hopefully we
> can also find a better way to do it.

The aya mark issue we discussed on the Persian computing list few months
ago; basically when script is Arabic, a string

  <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.

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.

Regards,
Khaled



More information about the HarfBuzz mailing list