[cairo] Cairo with m17n-lib
Kenichi Handa
handa at m17n.org
Fri Oct 22 00:22:06 PDT 2004
In article <E1CKHgb-0007PX-00 at chootrain.carl.worth>, Carl Worth <cworth at cworth.org> writes:
> 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
> sophisticated.
> 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
> cairo_show_glyphs.
I understand your policy and I basicly agree. But simply
drawing a single line muliti-script text is far from
"sophisticated text layout", and in that sense,
cairo_m17n_xxx are also toy APIs, not a way of "real use of
text".
Anyway, as I found a way to write cairo_m17n.c by including
<cairo.h> instead of "cairoint.h", it doesn't have to be
included in cairo itself. I'll distribute that version as
an demonstratoin of m17n-lib (and cairo) in our homepage.
> 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.
Yes. I once wrote a simple add-on module for pango (but not
completed), and asked Mr. Taylor about the possibility of
cooperation, but not yet got any reply.
Another way I'm now considering is using cairo as one of
write-only backend of the m17n-lib. Currently we support X
and gd libaray as backends.
---
Ken'ichi HANDA
handa at m17n.org
More information about the cairo
mailing list