Nmap Development mailing list archives

[PATCH] Zenmap DiffCompare FontDescription causes error to be generated in zenmap.exe.log


From: jah <jah () zadkiel plus com>
Date: Sat, 06 Sep 2008 04:10:02 +0100

Hi

I'm getting a font error with zenmap svn on windows.  From the
zenmap.exe.log:

<path>\zenmap.exe\zenmapGUI\App.py:183: PangoWarning: couldn't load font
"Monospace Normal, Not-Rotated 9", falling back to "Sans Not-Rotated 9",
expect ugly output.

It happens when loading up a pair of scans in the Compare Results
dialog.  The font used for the contents of the Comparison text area in
compare mode is, as the error says, not monospace.

The FontDescription in _set_diff_view in zenmapGUI/DiffCompare.py is
"monospace normal 9".  I've found that using "Monospace" or "Monospace
9" results in monospace text and no error generated.  The attached patch
makes it Monospace 9.

Regards,

jah
--- DiffCompare.py.orig 2008-09-06 03:49:59.312500000 +0100
+++ DiffCompare.py      2008-09-06 03:48:35.328125000 +0100
@@ -609,7 +609,7 @@
             self.diff_cell.set_property("background", "white")
 
     def _set_diff_view(self):
-        font_desc = pango.FontDescription("monospace normal 9")
+        font_desc = pango.FontDescription("Monospace 9")
         self.diff_cell.set_property("font-desc", font_desc)
         
         self.diff_scrolled.set_size_request(-1, 260)

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org

Current thread: