GNOME Bugzilla – Bug 323540
Scaling the cairo context seems to be wrong
Last modified: 2005-12-12 23:32:00 UTC
If you use cairo_scale (cr, 2, 2) and then create a PangoLayout and show some text the glyphs are 4 times the original size rather than 2 times as I'd expect. I've tested cairo, which seems to scale text OK, so I guess this is a Pango bug. I'll attach a test case in a sec.
Created attachment 55774 [details] Test case
Humm, it's trivial to see why this happens: When creating pango layout with the scaled cairo context, pango copies the transformation matrix, and scales by that. Cairo scales too. How is it supposed to be Owen?
Should be fixed now. 2005-12-12 Behdad Esfahbod <behdad@gnome.org> Fix bug #323540. * pangofc-fontmap.c (get_scaled_size): The logic in there is moved and renamed into pango-utils. * pango/pango-types.h, * pango/pango-utils.c (pango_matrix_get_font_scale_factor): New function. * pango/pangocairo-fcfont.c (get_font_size): Divide pixel-size by matrix font-scale-factor, since pixel-size is scaled.