[cairo] Pango + cairo

Keith Packard keithp at keithp.com
Tue Mar 15 07:42:43 PST 2005


> I'm not sure I understand the problem ... if you use the same layout
> and change the CTM, then you need to call pango_cairo_update_layout().
> Pango can't know that the CTM changed. (*)

I create the layout after the matrix is set, and, not knowing how the API
works, I also called pango_cairo_update_layout after selecting the font
size.  The odd thing is that the spacing scales with the CTM, but the
glyph sizes do not.



> There are several ways of doing this ... if you know it's a single line,
> you can do:
>
>  PangoLayoutLine *line = pango_layout_get_lines (layout)->data;

I'll read through the SVG spec and see whether this is always true; it may be
that SVG allows applications to request text wrapping or embed newlines.

> Many people don't have a good eye for subtly ugly text.

cf gnomejournal.org

-keith





More information about the cairo mailing list