Non uniform scaling



Hi,

I was looking into how to non uniformly scale fonts with Pango, and it
seems that the only way is to use cairo_scale. This is not great, however,
as it means I have to keep track of that scale to scale other transforms
I do afterwards and other things like the width of a Pango layout when
calculating positions. This makes it very brittle and unnecessarily
complex to use.

A better way would be to get Pango to allow non uniform scale. I've
found the place in the Pango source where the scale is set, and it is in
_pango_cairo_fc_font_new (I haven't looked for other backends, but I'm
sure you'll find it faster than me). Here, the font matrix is scaled
uniformly by the font size, rather than two scales.

Would it be possible to expose a non uniform scale in the Pango API ?
Hopefully no backends would lack the ability to do that.

Thanks


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]