Font Sizes



A while ago I asked about how to set the size (in lines) of a text
view.  Havoc filed bug 62103 about the unimplemented height_lines and
width_columns properties.  This bug has been marked resolved and it
says I should use textview->style->font_desc to get the size of the
font and size the widget using that info.

So now my question is, given a PangoFontDescription, how do I figure
out the width/height (in pixels) of text rendered in that font?

I'm guessing maybe I need to make a PangoFontMetrics and calculate
ascent + descent + pixels_above_lines + pixels_below_lines?  If that's
correct, how do I get the PangoFontMetrics?



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