Re: CJK patch (was Re: pango)

From: Tomas Frydrych <tomasfrydrych_at_yahoo.co.uk>
Date: Wed Mar 23 2005 - 09:07:18 CET

Hi Thep,

Theppitak Karoonboonyanan wrote:
> Will OpenType be supported? In Pango, we have two de facto
> implementations using PUA glyphs in fonts available in the market, and
> a third one using OpenType features. It would be great if we can have
> OpenType support as well, as PUA fonts are going to be obsolete in the
> (far) future, while OpenType fonts now begin to be available.

We do not do any font magic ourselves; the basic Unix graphics class
uses xft to draw and it does not provide any advanced typographical
functionality. I have no plans to change that, and I doubt anyone else
has. The reason we want to use Pango is precisely so we do not have to
deal with this kind of a thing.

As for the forthcoming gr_UnixPangoGraphics class, the internals of
Pango will be pretty much opaque to it: what ever will be supported in
Pango, will work in AbiWord. So the OpenType functionality is really
something to be addressed in Pango itself.

If you decide to go down the road of implementing a specialised graphics
class based on libthai and wanted to take advantage of OpenType advanced
features, you would need to either have that implemented in libthai, or
in that particular graphics class.

> Could you suggest which classes (or methods) to read for creating plugin
> classes?

As I said, have a look at all the methods in GR_Graphics which take as a
parameter either GR_RenderInfo or GR_Itemization; these are the methods
your graphics class would have to implement (there should be enough
comments in gr_Graphics.h to get you started). The GR_RenderInfo and
related subclasses, which are abstract classes allowing us to pass data
through the cross-platform layout engine in an opaque fashion, are
defined in gr_RenderInfo.h; you would need to provide implementation of
these to go with your graphics class. (gr_Win32USPGraphics is an example
of how this is done on Windows using Uniscribe; gr_Win32PangoGraphics is
a start of the Pango-based graphics class).

It would probably be easier to design the graphics class initially not
as a plugin (just like gr_UnixPangoGraphics); we can worry about the
details of how to turn it into a plugin later.

Tomas
Received on Wed Mar 23 09:12:33 2005

This archive was generated by hypermail 2.1.8 : Wed Mar 23 2005 - 09:12:33 CET