[HarfBuzz] Regression with ZWJ in Indic scripts

Behdad Esfahbod behdad at behdad.org
Tue Mar 19 03:28:43 PDT 2013


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...


>   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.

behdad


> Regards,
> Khaled
> 
> On Tue, Mar 19, 2013 at 05:56:22AM -0400, Behdad Esfahbod wrote:
>> BTW, how do you pass OpenType script tag to HarfBuzz?!
>>
>> On 13-03-18 03:15 PM, Khaled Hosny wrote:
>>> The issue reported below seems to be a regression in 0.9.13, basically
>>> ZWJ seems to be completely ignored, with 0.9.12 I get the desired
>>> output.
>>>
>>> Regards,
>>> Khaled
>>>
>>> ----- Forwarded message from Ian-Mathew Hornburg <imhornburg at gmail.com> -----
>>>
>>> From: Ian-Mathew Hornburg <imhornburg at gmail.com>
>>> To: xetex at tug.org
>>> Subject: [XeTeX] Incorrect Bengali ZWJ behavior and v2 script spec
>>> Reply-To: Unicode-based TeX for Mac OS X and other platforms <xetex at tug.org>
>>>
>>> I may have identified two possible bugs in 0.9999.0: the release notes
>>> indicate that the version-2 OpenType Indic script tags are now supported,
>>> and I’ve been testing various Bengali-script fonts with the git version of
>>> XeTeX and a current install of TeX Live 2012 to check them for correct
>>> shaping behavior. I’ve posted a MWE reproducing some examples from the
>>> Microsoft standard here: [http://pastebin.com/mgAX8c7U].
>>>
>>> Microsoft ships two Bengali fonts (Vrinda and Shonar Bangla; both v6.80)
>>> with Windows 8 that support both the older (beng) and newer (bng2) Bengali
>>> script specs. (Older versions of each are shipped with Windows 7 and other
>>> Microsoft products.) The fonts behave correctly when using the beng script
>>> feature, with the exception of a particular ZWJ sequence: the Microsoft
>>> spec [https://www.microsoft.com/typography/OpenTypeDev/bengali/intro.htm]
>>> says that the sequence of consonant-hasant-ZWJ-consonant should prevent a
>>> ligature of the two consonants, then render a half-form of the first
>>> consonant. XeTeX currently fails to suppress the ligature.
>>>
>>> ----- End forwarded message -----
>>> _______________________________________________
>>> HarfBuzz mailing list
>>> HarfBuzz at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/harfbuzz
>>>
>>
>> -- 
>> behdad
>> http://behdad.org/
> 

-- 
behdad
http://behdad.org/



More information about the HarfBuzz mailing list