--- a/Viewer.py Mon Jan 28 10:48:16 2008 +0100
+++ b/Viewer.py Mon Jan 28 11:15:24 2008 +0100
@@ -44,14 +44,14 @@
'mono' : 'Courier New',
'helv' : 'Arial',
'other': 'Comic Sans MS',
- 'size' : 10,
+ 'size' : 20,
}
else:
faces = { 'times': 'Times',
'mono' : 'Courier',
'helv' : 'Helvetica',
'other': 'new century schoolbook',
- 'size' : 12,
+ 'size' : 20,
}
#-------------------------------------------------------------------------------
@@ -317,12 +317,12 @@
dc = wx.ClientDC(self)
self.Font = wx.Font(faces["size"], wx.DEFAULT, wx.NORMAL, wx.NORMAL, faceName = faces["mono"])
dc.SetFont(self.Font)
- width, height = dc.GetTextExtent("A")
- while height > 17:
+ width, height = dc.GetTextExtent("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
+ while width > 260:
faces["size"] -= 1
self.Font = wx.Font(faces["size"], wx.DEFAULT, wx.NORMAL, wx.NORMAL, faceName = faces["mono"])
dc.SetFont(self.Font)
- width, height = dc.GetTextExtent("A")
+ width, height = dc.GetTextExtent("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
# Link Viewer event to corresponding methods
self.Bind(wx.EVT_PAINT, self.OnPaint)