Re: CJK patch (was Re: pango)

From: Tomas Frydrych <tomasfrydrych_at_yahoo.co.uk>
Date: Mon Mar 21 2005 - 11:43:55 CET

Hi Thep,

Theppitak Karoonboonyanan wrote:
>>Thai is too complex for us to support fully without Pango.
>
> Well, not really, provided that appropriate API's are defined.
> We have a collection of Thai implementation code ready for plugging at
> http://libthai.sourceforge.net/ including text rendering, text input,
> and word break.
>
> For libthai, dictionary approach is used. Is it possible to plug it into CJK
> rules?

No, it would not be, not along the lines the patch was proposed. The
base graphics class assumes rule-based line breaking, and I do not want
to change that (if anything, I want that class further simplified). What
you would need to do is to design a graphics class derrived from
GR_UnixGraphics that would rely on libthai. The class would need to
implement the virtual methods related to complex scripts (any graphics
method that takes GR_Item, GR_RenderInfo and their friends; see
gr_Graphics.h and gr_RenderInfo.h). How much work that would be depends
on how much of the rest of the Unix graphics you could reuse; it might
not be a huge amount of work.

We have the (untested) infrastructure for graphic classes to be plugins,
so you could have a libthai plugin that would replace the normal Unix
graphics class. This is something you might want to consider, because a
dedicated Thai graphics could be more efficient than the Pango graphics.

Tomas

>
> Regards,
> -Thep.
>
Received on Mon Mar 21 11:44:35 2005

This archive was generated by hypermail 2.1.8 : Mon Mar 21 2005 - 11:44:37 CET