Pango, set height in pixels



How do I set the font size to a number of pixels high? I can only find 
pango_font_description_set_size() which sets it in pango units.

Should i convert it myself using the DPI for the screen? But this must be 
quite common, so there is probably some way to do this.

I can also use pango_layout_get_pixel_extents() and change the pango units 
until I get the correct height.

The text is supposed to match some other elements and grow in height when 
they grow. So it really needs to be specified in pixels.

-- 
/Dennis




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