Re: OpenType Indic Support



At 08:28 PM 12/19/2001, Owen Taylor wrote:

Eric Mader <mader jtcsv com> writes:

> Hello,
>
> I've got an OpenType based Indic shaper that I'm working on porting to
> Pango.

Great!

> It's a single piece of code that's driven by a script-specific
> table. Ideally, I'd like to have a single script_shape routine that's
> called with the address of the table as a parameter, but it doesn't
> look like there's any way to do that since the PangoEngine isn't a
> parameter to the script_shape routine, and there's no provision for a
> client-specific data pointer.

Actually, the PangoEngine is passed in, though it may not
be obvious how -- it's accessible as analysis->shape_engine.

Cool!

> So, I'm guessing that the best I can can do is to make a bunch of
> short script_shape routines that call the main routine with the right
> table address. Have I missed something, or is this the best I can do?

You can certainly create a structure that extends PangoEngineShape
and adds an extra pointer, though whether this is easier than
having small wrapper routines, I don't know.

Well, I'm porting from C++, so my initial inclination is to extend PangoEngineShape, but I may start with the wrappers 'cause it will be a bit easier to get that right the first time.

> Also, I'm a little unclear on what the different types of shapers
> are. I assume that mine should be an "xft" shaper like the Arabic
> one. Can someone give me a pointer for where to look to hook in my new
> shaper?

The different types of shapers correspond to the different
font engines in Pango -

 PangoXft (rendering of client side fonts using Xft and the
           XRENDER extension)
 PangoFT2 (client side fonts, no reference to X)
 PangoX   (old-style X bitmap fonts)
 PangoWin32 (windows native fonts)

Layout using OpenType is relevant to at least PangoXft
and PangoFT2, and possibly PangoWin32 as well (though that's
a bit different since it doesn't use FreeType to access the
fonts), so I'd expect the core of your shaper to eventually
be useful for multiple fontbackens.

But for now, the OpenType support is only compiled into the
Xft backend, and only the Xft backend has the necessary
hooks to use it (though it would be pretty trivial to
add to the FT2 backend.) So, copying the general way
the arabic-xft is compiled and registers itself probably
is the way to go.

OK, I'll copy the arabic-xft for now. Do I need to touch anything else to get my module to load?

Regards,
                                        Owen

Thanks,
Eric

_______________________________________________
gtk-i18n-list mailing list
gtk-i18n-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-i18n-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]