Re: Non uniform scaling
- From: Behdad Esfahbod <behdad behdad org>
- To: "ogg k ogg k googlemail com" <ogg k ogg k googlemail com>
- Cc: gtk-i18n-list gnome org
- Subject: Re: Non uniform scaling
- Date: Wed, 22 Oct 2008 23:18:51 -0400
ogg k ogg k googlemail com wrote:
> 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.
That's unfortunately true.
> 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.
I have thought about this. But if we want to dd any extended versions, it
should be allowing a full font matrix, not separace x,y scales only. And
making such a change needs changes to many places in Pango, the more limited
of them being a PangoFontDescription. It may happen one day, but it's not
> Would it be possible to expose a non uniform scale in the Pango API ?
> Hopefully no backends would lack the ability to do that.
] [Thread Prev