Re: [gtk-list] Quering text height in gdk




On Thu, 18 Jun 1998, David Abilleira Freijeiro wrote:
> 	I havenīt found any function in gdk to know the height of a text
> string. In the case of gdk_text_measure, it īs implementation get it
> (through XTextExtents) but only returns text width.
> 	Is there any way to obtain it without working with xlib?

If your string is in a GdkFont called 'font', then

gint height = font->ascent + font->descent;

At least, I think I remember that right.

Havoc Pennington ==== http://pobox.com/~hp



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