[pygtk] PangoWarnings on win32

Nathan Matteson nathan at eightyproof.com
Tue Mar 18 11:06:09 WST 2008


I'm having some trouble sorting out some PangoWarnings caused (I think) 
by a FileChooserDialog. The code for the dialog is almost straight form 
learningpython.com's pyWine app -- and pyWine gives me the same 
warnings. I've been hunting for answers to this for a week now, to no 
avail. The only info I find that seems relevant is in one foreign 
language or another, none of which I can read. Also, I'm a highly 
inexperienced programmer.

The warnings sprout up as soon as I open the file dialog and follow, 
slightly abbreviated:

------------------------------------

Warning (from warnings module):
  File "C:\Python25\projects\axon\axon.py", line 465
    file_dialog = gtk.FileChooserDialog(title="Save Illustrator Action", 
action = dialog_action, buttons = dialog_buttons)
PangoWarning: couldn't load font "Sans Not-Rotated 10", falling back to 
"Sans Not-Rotated 10", expect ugly output.

...All font fallbacks failed!!!

...pango_shape called with bad font, expect ugly output

...pango_font_get_glyph_extents called with null font argument, expect 
ugly output

------------------------------------

The code that causes the warnings:

.
.
.
[Line463]    def file_browse(self, dialog_action, action_file=""):
[Line464]       dialog_buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, 
gtk.STOCK_SAVE, gtk.RESPONSE_OK)
[Line465]       file_dialog = gtk.FileChooserDialog(title="Save 
Illustrator Action", action = dialog_action, buttons = dialog_buttons)
.
.
.

-----------------------------------

If I rewrite the code so that the filechooserdialog is created from a 
glade file (i.e., self.wTree = gtk.glade.XML(self.gladefile, 
"filechooserdialog1")), then that line of code causes the same warnings. 
I'm confused in part because I'm using another dialog in the same app 
(not a filechooser though), and it gives me no trouble. Also, no 
combination of importing/not-importing pango, cairo, and/or pangocairo 
sorts this out.

Requisite system info: WinXPSP2, GTK2.10.11, Python2.5, pygtk2.10.6, 
pycairo1.2.6, pygobject2.12.3.

Thanks for any help.




More information about the pygtk mailing list