[cairo] Cairo with m17n-lib

Carl Worth cworth at cworth.org
Wed Oct 20 07:43:33 PDT 2004

On Mon, 16 Aug 2004 20:32:34 +0900 (JST), Kenichi Handa wrote:
> For instance, this kind of image can be easily
> created:
> 	http://www.m17n.org/m17n-lib/cairo/cairo-hello.png

That's a lovely image. And it's great to see that it can be generated
from such a simple program.

> What do you think?  Could you consider including the patch
> described in the above page in cairo itself?

I don't think this is the right way to integrate work like this into

The cairo_select_font/cairo_show_text calls are really just toys. They
are there so that tiny demo programs can select a single font and put
some text on the screen. They layout performed in cairo_show_text is as
simplistic as possible and there are no plans to make it more

Any real use of text, (such as something supporting multiple languages),
should instead go through cairo_set_font/cairo_show_glyphs.

The reason for this is that sophisticated text layout is a global
problem that must deal with words, lines, blocks, paragraphs, etc. These
are all objects of which cairo is not aware and so must be handled at a
higher layer in the application. Once layout is complete, cairo can be
handed a bag of glyphs with the location of each through

So, I think the effort to include m17-lib should be directed at
programs/libraries that intend to use cairo. For example, pango might be
a good place to look to see if the functionality that m17-lib provides
would be useful.


More information about the cairo mailing list