[pygtk] setting a filter for gtk.FontSelection

Le Roux Bodenstein lerouxb at gmail.com
Sun May 4 20:36:25 WST 2008


I'm trying to display a font selection widget that only lists monospace
fonts. I found the documentation for gtk.FontSelection here:
http://www.pygtk.org/docs/pygtk/class-gtkfontselection.html

And it mentions base and user filters:

"Filters can be used to limit the font selections. There are 2 filters
in the gtk.FontSelection - a base filter and a user filter. The base
filter cannot be changed by the user, so this can be used when the
user must choose from the restricted set of fonts (e.g. for a
terminal-type application you may want to force the user to select a
fixed-width font). The user filter can be changed or reset by the
user, by using the Reset Filter button or changing the options on the
Filter page of the widget."

..but I cannot find any documentation or other reference to these
filters. How do I set them? How do they work? Is this something that's
not implemented in pygtk, was removed from gtk at some stage, is just
not documented or am I losing my mind? :)

I've done some google searches, checked the tutorial, tried to find
some examples, etc, but either I'm bad at searching today or it is
just not there.

(Funny enough the ruby bindings contain the same paragraph and also no
documentation on the filters)

Le Roux


More information about the pygtk mailing list