Text at a certain width



Hi!

In Dia, we render text with Pango, and typically the text is within boxes just big enough to fit the text.  This means that when zooming in and out, we want the text to be rendered with the same relative width, i.e. stretching or compressing it a little when font scaling isn't linear.  How can we do that with Pango?

There's mention in pango_layout_set_justify (which would somewhat solve it) that it's not implemented in 1.10.  Am I missing some other way to set the width?  This functionality is critical to the looks and performance of Dia -- currently we tweak the font size every time we render a string at non-100% zoom, which is *horribly* slow, but works.  I may have to give damn-all about the good looks and just stretch the rendered bitmap.  I don't really care if it looks a little funny in certain fonts, as long as it looks reasonable in the most frequently used cases. 

-Lars


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