[HarfBuzz] hb-view and beyond

Behdad Esfahbod behdad at behdad.org
Wed Sep 21 10:22:09 PDT 2011


On 09/21/11 12:32, Khaled Hosny wrote:
> On Tue, Sep 20, 2011 at 04:46:40PM -0400, Behdad Esfahbod wrote:
>> On 09/20/11 14:32, Khaled Hosny wrote:
>>> I just noticed that feature ranges assume byte not character count, e.g.
>>> to apply a feature for first 10 Arabic characters I've to pass
>>> [:20] not [:10], I can live with that but it wasn't obvious at first.
>>
>> Right.  They are indices into the UTF-8 text.  I can provide a mode to count
>> characters.  I agree that it would be easier that way.  Maybe it should be the
>> default?
> 
> That would make more sense, I can't even think if use case where counting
> by bytes would be preferred over characters.

Well, for machine-generated offsets, byte indices are easier.


> I ended up using a csv file so I can specify options to pass to hb-shape
> (I want to test optional and script/language sensitive features etc.)
> and a python script to parse the file, run hb-shape and compare the
> results (if anyone interested, check [1])

Great.  I'm designing something similar today.

behdad



More information about the HarfBuzz mailing list