[HarfBuzz] [PATCH] Added an Indic shaper
Jonathan Kew
jonathan at jfkew.plus.com
Thu Apr 21 08:17:09 PDT 2011
On 21 Apr 2011, at 16:01, Tom Hacohen wrote:
> On Thu, 2011-04-21 at 15:54 +0100, Jonathan Kew wrote:
>> I'm afraid this is _not_ sufficient to get correct rendering of most (all?) Indic scripts. In addition to the application of OpenType features, Indic scripts require reordering of certain characters; for example, some vowel marks such as the Devanagari short I are encoded following a consonant (cluster) but must be reordered before it for rendering. OpenType features do not handle this; it is the responsibility of the shaping engine.
>>
>> Also, some of the OT features need to be applied selectively only to certain characters within the Indic syllable, not indiscriminately to all the text.
>>
>
> Seeing the complexity of Harfbuzz.old's indic shaper, I figured as much,
> but thanks for the verification. As I said, I can't read any of those,
> and my tests "looked like pango" so I hoped everything was fine.
Superficially, it may look "reasonable" at first glance, but I suspect that if you try a word like "Hindi" (हिन्दी) and compare it closely to Pango's rendering, you'll find that the initial pair of glyphs is coming out reversed.
>
> So what's next? How can I further advance the creation of a proper Indic
> shaper? What do you guys do in Firefox?
Currently, we only use hb-ng for "simple" scripts and for Arabic (and its relatives - Syriac, N'ko), and fall back to platform shaping libraries (uniscribe/directwrite/coretext/pango) for Indic, etc.
I'm not sure how best to push this forwards. I made a start on a Devanagari shaper some time ago, but have not worked on it recently, and in the meantime there's been a lot of internal change in the hb-ng code, so none of what I did then will be directly usable now. I've passed it over to Behdad, but don't know if he's given any thought recently to how this will be managed within hb-ng. The internal API it uses to interact with the Arabic shaper is not sufficient to support Indic; some added "hooks" or whatever will be needed for the more complex processing model.
JK
More information about the HarfBuzz
mailing list