[cairo] About cairo_show_text and UTF-8...

Mike Emmel mike.emmel at gmail.com
Fri Jan 6 09:48:42 PST 2006

On 1/6/06, Carl Worth <cworth at cworth.org> wrote:
> On Thu, 05 Jan 2006 10:43:40 -0500, Scott Robert Ladd wrote:
> >
> > Why the difference in fonts? If Cairo is the rendering agent for GTK+,
> > should they be using the same default fonts?
> It's not a difference in the default font.
> What is happening is that GTK+ (through pango) actually uses
> _multiple_ fonts for displaying glyphs of interest. And as it turns
> out, pango is using cairo to do that.
> The only different part is that cairo_show_text currently looks only
> at a single font to find glyphs for the characters it is asked to
> display.
> I would be glad to see this improved, but it's not really that
> significant an issue. The cairo_show_text is part of cairo's "toy text
> API" which is really intended to be used in demos etc. More practical
> uses of cairo should use cairo_show_glyphs as pango does.
show_glyphs avoids the issue of finding the fontset :)
You still really need a library with the guts of pango associated with cairo.
This includes collecting the fontset
Line breaking wrapping.

Cairo really needs a portable non toy api for text IMHO.
It can be done as a bundled companion library.


> -Carl

More information about the cairo mailing list