Re: [gtk-list] GdkFont: Getting ascent/descent for char

"Matthias Koester" <Matthias.Koester@Informatik.Uni-Oldenburg.DE> writes:

> How can i get the ascent/descent of an individual char? Looking at the GDK
> doc, it seems to me, that there only exists functions to retieve the
> ascent/descent of the font. Or can i call the functions with a single char
> string to get the ascent/descent of the given char?


gdk_text_extents (GdkFont     *font,
                  const gchar *text,
                  gint         text_length,
		  gint        *lbearing,
		  gint        *rbearing,
		  gint        *width,
		  gint        *ascent,
		  gint        *descent)

With a length 1 string will do the job and also be reasonably
efficient about it.


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