[shpy-commit] r2937 - shpy/trunk/dist/shpy/ui_pygame

arigo@codespeak.net arigo@codespeak.net
Sun, 8 Feb 2004 13:55:07 +0100 (MET)


Author: arigo
Date: Sun Feb  8 13:55:06 2004
New Revision: 2937

Added:
   shpy/trunk/dist/shpy/ui_pygame/VeraMoBd.ttf   (contents, props changed)
Modified:
   shpy/trunk/dist/shpy/ui_pygame/ui_pygame.py
Log:
Added a not-too-bad monospaced free font.
See 'svn propget copyright VeraMoBd.ttf'.



Added: shpy/trunk/dist/shpy/ui_pygame/VeraMoBd.ttf
==============================================================================
Binary file. No diff available.

Modified: shpy/trunk/dist/shpy/ui_pygame/ui_pygame.py
==============================================================================
--- shpy/trunk/dist/shpy/ui_pygame/ui_pygame.py	(original)
+++ shpy/trunk/dist/shpy/ui_pygame/ui_pygame.py	Sun Feb  8 13:55:06 2004
@@ -9,9 +9,13 @@
 
 RESOLUTION = (768, 512)
 #RESOLUTION = (300, 300)
-#FONT = 'lucon.ttf'
-FONT = None
-HEIGHT = 24
+#FONT = None
+#HEIGHT = 24
+#ANTIALIAS = 1
+
+FONT = 'VeraMoBd.ttf'
+HEIGHT = 12
+ANTIALIAS = 0
 
 WAKEUPEVENT = USEREVENT
 
@@ -205,7 +209,7 @@
             char = line.content[x:x+1]
             if not char:
                 char = ' '
-            charimage = self.font.render(char, 1, (255,255,255), cursor.color)
+            charimage = self.font.render(char, ANTIALIAS, (255,255,255), cursor.color)
             startofline = line.content[:x]
             if startofline:
                 startoflineimagesize = self.font.size(startofline)
@@ -226,7 +230,7 @@
         for line in lines:
             if ypos > screenheight:
                 break
-            lineimage = self.font.render(line.content or ' ', 1, line.getcolor())
+            lineimage = self.font.render(line.content or ' ', ANTIALIAS, line.getcolor())
             self.screen.blit(lineimage, (0, ypos))
             self.line2ypos[line] = ypos
             ypos += lineimage.get_size()[1]