Pango Font Scaling



Hi,

I'm having problems understanding how font scaling works in Pango.
I have a box into which I'm rendering a PangoLayout object.
When I double the size of the box, I need the font to be scaled by both 
height and width accordingly.

At first I naively tried just pango_font_description_set_size(...) with a 
size twice as large but this doesn't work.

If I understand correctly, 
(shape of a font at size X)*2 != (shape of font at size 2X)
Is this correct?
How can I get what I want?
I essentially need to "zoom in" to the layout.

The next step was to try to scale the font in a loop, each time through, 
testing the height of the text against what it should be and stopping when 
we get an approximation. Problem is that this is a complete hack and fails 
some times. (Since the font widths don't scale in both directions 
propotionally, the word wrapping changes as I scale)

The list archives yielded a couple of posts suggesting using FT2 to 
render.
Is there any way I can do this in Pango?

Thanks,
Haran
-- 
Patriotism is not a flag on your antenna





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