pygtksourceview causes crash if font not present on windows
- From: Stuart Axon <stuaxo2 yahoo com>
- To: gnome-devtools gnome org
- Subject: pygtksourceview causes crash if font not present on windows
- Date: Tue, 22 Dec 2009 17:32:13 -0800 (PST)
Hi
if I call
modify_font(pango.FontDescription('Bitstream Vera Sans Mono 8'))
in pygtksourceview in windows, without this font installed, things crash horribly:
A dialogue comes up saying:
Gtk-WARNING (recursed) **: gtksourceview.c:4567: somehow some text lines were modified or scrolling occured since the last validation of lines on the screen - may be a text widget bug.
Pango-WARNING (recursed) **: couldn't load font "Bitstream Vera Sans Mono 8", falling back to "Sans 8", expect ugly output.
aborting...
If I click that then I get...
Runtime Error!
Program: C:\usr\Python26\python.exe
This application has requested the Runtime to terminate in an unusual way.
Please contact the application's support team for more information.
...this is when the call is wrapped in an exception, is there an easy way to specify a fallback font ? - If not throwing an exception would probably make more sense here.
Best Regards
S++
[Date Prev][Date Next] [Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]