[HarfBuzz] Regression with ZWJ in Indic scripts

Khaled Hosny khaledhosny at eglug.org
Tue Mar 19 03:37:17 PDT 2013


On Tue, Mar 19, 2013 at 06:28:43AM -0400, Behdad Esfahbod wrote:
> On 13-03-19 06:21 AM, Khaled Hosny wrote:
> > I was doing something like:
> > 
> >   script = hb_script_from_string (engine->script, -1)
> >   language = hb_language_from_string (engine->language, -1)
> >   hb_buffer_set_script (buffer, script)
> >   hb_buffer_set_language (buffer, language)
> > 
> > But this didn’t work for, say, ‘bng2’ script, now I understand that the
> > _from_string() functions take ISO tags, so now I do something like:
> 
> Right.  So if you tried it with 'bng2' with that code, you were getting the
> generic shaper!  Hence my surprise that your reporter was saying that one
> works but not the other...

Exactly, that what triggered me to look closer.

> >   script = hb_ot_tag_to_script (hb_tag_from_string (engine->script, -1));
> >   language = hb_ot_tag_to_language (hb_tag_from_string (engine->language, -1));
> > 
> > since users of XeTeX are expected to pass OpenType script and language
> > tags (macro package can provide user friendly names). Now I’m not sure
> > if passing version 1/version 2 tags for Indic scripts really make
> > HaarfBuzz use them, or there is some internal magic to do the right
> > thing, I was about to ask :)
> 
> It doesn't, since both 'beng' and 'bng2' map back to the 'Beng' script.  There
> is no way to force HarfBuzz to use old-spec when new-spec is available.

I think that is good, it removes the burden for choosing the correct tag
from users/macro packages.

Regards,
Khaled



More information about the HarfBuzz mailing list