[pygtk] GDK bindings?

James Henstridge james@daa.com.au
Sat, 2 Sep 2000 11:30:29 +0800 (WST)


On Fri, 1 Sep 2000, Martijn Faassen wrote:

> Hi there,
> 
> Yesterday I was playing with PyGTK again. Since I was doing some
> formatting of fonts on the canvas, eventually I was interested in
> getting information about the font dimensions and such. 
> Unfortunately, much (most?) of GDK does not appear to be exposed to
> Python, which was a problem when I wanted to use gdk_string_extends().
> 
> Is there any work on these bindings, or what are my prospects here?

If you have a GdkFont object, use its extents(str) method, which returns
the tuple (lbearing,rbearing,width,ascent,descent).

> 
> Regards,
> 
> Martijn

James.

-- 
Email: james@daa.com.au
WWW:   http://www.daa.com.au/~james/