[HarfBuzz] harfbuzz-ng: Branch 'master'

Jonathan Kew jonathan at jfkew.plus.com
Tue Jun 1 09:13:01 PDT 2010

Hi Behdad,

I updated my Mozilla tree to use your latest code, with the allocator and feature compilation. Looks good in general, but I had one problem: disabling a default feature (using liga=0) didn't work.

Tracked this down to the sorting of feature_info_t records in hb_mask_allocator_t::compile(); although the liga=0 record originally followed the liga=1 (default) record, the qsort operation ended up reversing them, so then the default overrides the user feature. This seems to indicate that the feature_info_t::cmp() function is not doing what you want, in the case where the tags are the same.

I fixed this by adding an explicit "sequence" field to the feature_info_t records, so that the cmp() function can reliably maintain the original ordering for features with the same tag. This avoids the need to rely on the (perhaps implementation-dependent?) behavior of a pointer ordering comparison.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: feature-sorting.patch
Type: application/octet-stream
Size: 1297 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20100601/118b6618/attachment.obj>
-------------- next part --------------

More information about the HarfBuzz mailing list