[HarfBuzz] Possible bug in chain_context_lookup with Gpos

Khaled Hosny khaledhosny at eglug.org
Thu Jan 6 10:08:56 PST 2011


On Fri, Jan 07, 2011 at 12:06:40AM +0630, Keith Stribley wrote:
> Hi Behdad,
> 
> I think there maybe a bug in the handling of kerns using format 3 Chaining Context lookups. When GPOS lookups are used, then the output part of the buffer does not seem to be used. In this case if there is a backtrack context, then the check (c->buffer->out_len<  backtrackCount) at the start of chain_context_lookup will always fail. For GPOS I think it should use the main buffer not the output buffer. Presumably the current code works fine for Chaining Contexts for GSUB lookups, but the attached patch may be necessary for GPOS.
> 

You just read my mind!

I was experimenting with a new feature in my font; chaining contextual
mark positioning and it did not work wit Pango/HarfBuzz but works fine
with ICU and Uniscribe.

It seems to work if the main and context glyphs are marks, say:

  <base><mark1><mark2>

If the lookup is being applied to mark1 with mark2 as a context of it,
things seems OK, but in cases like:

  <base1><base2><mark>

With the lookup being applied to mark and <base1><base2> as context for
it, it does not work.

The font:
http://khaledhosny.org/files/tmp/amiri-regular.ttf

And attached rendering of the string "ربر رير" in Pango and XeTeX
(ICU); the dots should be positioned a bit lower when the contextual
lookup is applied.

Regards,
 Khaled

PS. I could not build Pango's harfbuzz-ng-external branch here, so I
only tested with Firefox beta 8 which I assume is now using HB even on
Linux.

Regards,
 Khaled

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-pango.pdf
Type: application/pdf
Size: 3382 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20110106/0c6d8752/attachment.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-xetex.pdf
Type: application/pdf
Size: 5509 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20110106/0c6d8752/attachment-0001.pdf>


More information about the HarfBuzz mailing list