Re: [gtk-list] Quering text height in gdk
- From: robert havoc pennington <rhpennin midway uchicago edu>
- To: Lista GTK <gtk-list redhat com>
- Subject: Re: [gtk-list] Quering text height in gdk
- Date: Fri, 19 Jun 1998 22:16:16 -0500 (CDT)
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]