PangoWarning: failed to choose a font with 'PangoRenderWin32' renderer



Hi all,

I have been facing this problem with font rendering in multiple PyGTK-based programs now and finally want to find out what the real problem is.

Using the most recent PyGTK all-in-one installer, I get the following warning:

C:\Projects\Site Deploy\site_deploy\frontend\gui.py:126: PangoWarning: failed to choose a font, expect ugly output. engine-type='PangoRenderWin32', script='latin'
  self._mainWindow.show()
C:\Projects\Site Deploy\site_deploy\frontend\gui.py:126: PangoWarning: failed to choose a font, expect ugly output. engine-type='PangoRenderWin32', script='common'
  self._mainWindow.show()


All text glyphs are then rendered as rectangles. This also happens the older versions of GTK+, pycairo, pygtk, pygobject. No problem on Ubuntu. Creating a new "pango.modules" file with pango-querymodules.exe does not help (suggested in some forums, but modules are built into DLLs on Windows, anyway).

Today I created a fresh Windows XP installation in VirtualBox. Installed Python 2.6, PyGTK all-in-one, and it worked. Just in very few cases, when starting the program for the first time after booting, it shows the same font rendering problem. Changing the locale to German also did not trigger the problem. Copying all fonts from my host to the VM also did not trigger it.

I'm kind of lost right now, why am I having problems on my host Windows? GTK_HOME is correctly set to the PyGTK all-in-one GTK+ runtime, and PATH does not contain any other GTK installations.

Attached to this mail is a ZIP with the following files (all output generated with env variable PANGO_WIN32_DEBUG=true set):
  • failed-stderr.txt / failed-stdout.txt - Output of the program on the host, rendering boxes instead of characters
  • vm-success.txt - Output of the program in the VM, rendering fonts correctly

Related thread (which didn't solve the problem for me): http://lists.cairographics.org/archives/cairo/2010-January/018918.html
This problem is related to my program Site Deploy, which is PyGTK-powered (and I don't want to switch to Qt because of this...).

Best regards

Attachment: pangobug.zip
Description: Zip archive



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