[cairo] Pango + cairo
Owen Taylor
otaylor at redhat.com
Tue Mar 15 15:46:19 PST 2005
On Tue, 2005-03-15 at 10:55 -0500, Owen Taylor wrote:
> 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?
This is now fixed in CVS; was various bugs in the font caching code.
2005-03-15 Owen Taylor <otaylor at redhat.com>
* pango/pangofc-fontmap.c: Include the effect of the
CTM in the FC_PIXEL_SIZE we set in the FcPattern.
(Fixes problems with getting the wrong font when drawing
the same font at multiple scales. Reported by Keith
Packard.)
* pango/pangofc-fontmap.h pango/pangocairo-fcfontmap.c
pango/pangocairo-fc.h pango/pangocairo-fontfont.c: Add
the PangoFontDescription to create_font() ... we need it
to get the right pixel size to combine with the CTM.
* pango/pangofc-fontmap.c (pango_fc_fontmap_get_dpi):
Extract out the logic for finding the DPI from the
size-listing code.
(pango_fc_font_map_get_render_key): Handle mix of
absolute and not sizes correctly.
-------------- 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/9f7ab44d/attachment.pgp
More information about the cairo
mailing list