[HarfBuzz] patch to add getters for gr_font and gr_face

Behdad Esfahbod behdad at behdad.org
Sun Dec 9 15:49:08 PST 2012


On 12-12-09 04:34 AM, Khaled Hosny wrote:
> On Sat, Dec 08, 2012 at 12:41:01AM +0700, Martin Hosken wrote:
>> Dear Behdad,
>>
>> Khaled says he needs this for xetex. I enclose a patch to add getter
>> functions to hb-graphite2 for gr_font and gr_face. No idea if the work
>> though ;)
> 
> Thanks Martin, this seems to work for my need (hb-graphite2.h is missing
> a graphite2/Font.h include, though), I was hoping it would return
> Graphite face/font only if graphite2 shaper is actually used, but it is
> not a big deal for XeTeX use case.

The way you are supposed to use the API for something like that is to create a
shape_plan first, and use hb_shape_plan_get_shaper() and strcmp to "graphite2".

I pushed out the new API now.  Looks to me like it should indeed only return
non-NULL in cases that graphite2 backend will be used by default, though I've
not tested those.  The API is a bit different from what Martin provided.

behdad


> Regards,
> Khaled 

-- 
behdad
http://behdad.org/



More information about the HarfBuzz mailing list