GTK+ Font Metrics (Creating a display)



I'm creating a display using GTK+ and I'm having problems setting the height of the fonts... I mean...

If I have a 168x136 (pixels) display and 21x8 characteres:

168 / 21 = 8 pixels per char (width)
136 / 8 = 17 pixels per char (height)

* Wich size, in points, should I use to get a 8x17 pixels char? (It's depends on the font, but how can I calculate this?).
* I must calculate the font size at run time.
* The display resolution will be changeable, something like skins.
* Each line of the display is a GtkLabel.
 
Leonel Freire

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