[HarfBuzz] Indic support in Harfbuzz
b.rahul.pm at gmail.com
Tue Dec 15 07:29:28 PST 2009
On Mon, Dec 14, 2009 at 11:34 PM, Eric Mader <emader at icu-project.org> wrote:
> Jonathan Kew wrote:
>> On 14 Dec 2009, at 16:26, kevin & siji wrote:
>>> On Mon, Dec 14, 2009 at 12:39 PM, Behdad Esfahbod <behdad at behdad.org> wrote:
>>> On 12/13/2009 11:03 PM, Parag Nemade wrote:
>>>> Hi Behdad,
>>>> On Friday 11 December 2009 01:57 PM, Jonathan Kew wrote:
>>>>> On 10 Dec 2009, at 21:29, Parag Nemade wrote:
>>>>>> I would like to know whether current harfbuzz code can be used for testing the rendering of Indic scripts?
>>>>> Not easily, I think. A little while ago, I started work on Indic support (initially concentrating on the "new" Devanagari standard as used in Vista/Windows7), but AFAIK I don't think Behdad has committed any of that code to the repository yet. At that time, there were still some changes happening in the internal shaper/features APIs. I've been busy in other areas for the past few weeks, so have not been pressing to get this integrated.
>>>> Can you check if Jonathan's code can still be integrated in harfbuzz?
>>> It's not. Will get to it this week.
>>> Is it worth reinventing the wheel? Is it not possible to use the code from ICU or Pango? Already a bunch of complex script rendering engines (ICU, Pango, Uniscribe) has made the Indic rendering scene a mess. Currently fonts should have separate ligature rules according to different rendering engine behaviours to create a single expected result universally.
>> AFAIK, neither ICU nor Pango code has support for the new Indic script tags and shaping behavior, so we'd need to adapt/extend/rewrite/something for that. And the shaping code interacts closely with the glyph buffer and with the feature controls, all stuff that differs between engines. So "use the code from ICU or Pango" is nowhere near as straightforward as it sounds. We may do that, but it would still need considerable work.
> ICU has code to support 'dev2'.
>> In view of all that, I decided to experiment with writing a 'dev2' shaper directly from the spec, to see how that would work out (and to learn more about the details of the new spec, in the process). If we decide in the end that the old Pango or ICU code is preferable, that's fine. I'm not particularly interested in reinventing any wheels, if the old wheels can be upgraded to meet today's need, but it was not immediately clear to me whether that would actually be any easier or lead to a better result.
> Microsoft has claimed that the Indic specs needed to be rewritten
> because the old specs weren't sufficient to implement all the required
> behavior for all the scripts. I don't know the details, but I'm inclined
> to believe them.
I would second on that and for this matter even unicode is not perfect.
Apart from being imperfect, OT specs are not even complete. Uniscribe
has undergone too many changes without any reflection in the OT specs
for a long time. Even the new specs do not seem to have incorporated
all the necessary changes. Now it is not just the linux fonts but also
some of the windows fonts that suffer from non-backward-compatible
IMO either we have to go for a completely independent platform (like
graphite) or followup with uniscribe very closely.
More information about the HarfBuzz