[HarfBuzz] Possible bug in chain_context_lookup with Gpos

Behdad Esfahbod behdad at behdad.org
Thu Jan 6 10:40:45 PST 2011


Ack.  Let me fix this.

On 01/06/11 13:08, Khaled Hosny wrote:
> 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
> 
> 
> 
> 
> _______________________________________________
> HarfBuzz mailing list
> HarfBuzz at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/harfbuzz



More information about the HarfBuzz mailing list