Hi all,

I want to add some customisation to the fonts I use in my TextWidgets (I
mostly want to have a nice fixed-width font). The only way I found for now
was to do the following :

font = pango.FontDescription('Courier 12')

This gives me a nice fixed width font... But it is plain ugly compared to
the one I custom-tailored using real X font description
('-adobe-courier-medium-r-normal--12-120-75-75-m-70-iso8859-1' for the
curious).

So my questions are :

  1) is it possible to detect that one runs on X and then loads a font using
     the X11 description (and do a fallback on the standard way when running
     on, for example, Windows) ?

  2) I wanted to list the available 'families' (to maybe get something else
     than Courier that would give me the same result as my X font). The C
     documentation gives me the pango_font_map_list_families() API to do
     what I want to do.

     But when I try this on Python (pango.FontMap.list_families()) I get
     told that this needs to have a 'pango.FontMap' argument. But how do I
     create a pango.FontMap object as it always tells me that it is an
     abstract widget ?

All in all, having more Pango / Atk examples in the Python-GTK source
distribution would be nice :-)

         Lionel (slowly catching up with Gtk2 changes :-) )

-- 
                 Lionel Ulmer - http://www.bbrox.org/
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to