[cairo] Pango + cairo

Owen Taylor otaylor at redhat.com
Tue Mar 15 07:55:08 PST 2005


On Tue, 2005-03-15 at 07:42 -0800, Keith Packard wrote:
> > 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 first should be sufficient... basically pango_cairo_update_layout()
just copies the CTM from the context into the layout's PangoContext,
and then when real layout happens, that CTM is used.

Can you figure out a modification of pango/examples/cairosimple.c that
reproduces your problem?

>  The odd thing is that the spacing scales with the CTM, but the
> glyph sizes do not.

The symptom is not surprising ... Pango passes glyph positions to 
Cairo in user space, so if Pango disagrees with Cairo as to the CTM,
you'll see this behavior.

Regards,
						Owen


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050315/d08a3208/attachment.pgp


More information about the cairo mailing list