Re: Non uniform scaling



ogg k ogg k googlemail com wrote:
> Hi,

Hi there,

> 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
currently planned.

Regards,

behdad

> 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]