[pypy-svn] r32624 - pypy/dist/pypy/translator/tool/pygame

ac at codespeak.net ac at codespeak.net
Mon Sep 25 12:15:51 CEST 2006


Author: ac
Date: Mon Sep 25 12:15:50 2006
New Revision: 32624

Modified:
   pypy/dist/pypy/translator/tool/pygame/drawgraph.py
Log:
Fix workaround for bug in SDL.

Modified: pypy/dist/pypy/translator/tool/pygame/drawgraph.py
==============================================================================
--- pypy/dist/pypy/translator/tool/pygame/drawgraph.py	(original)
+++ pypy/dist/pypy/translator/tool/pygame/drawgraph.py	Mon Sep 25 12:15:50 2006
@@ -635,9 +635,12 @@
         while i < len(parts):
             part = parts[i]
             word = part[0]
-            antialias = not re_nonword.match(word)  # SDL bug with anti-aliasing
             try:
-                img = font.render(word, antialias, *part[1:])
+                try:
+                    img = font.render(word, False, *part[1:])
+                except pygame.error, e:
+                    # Try *with* anti-aliasing to work around a bug in SDL
+                    img = font.render(word, True, *part[1:])
             except pygame.error:
                 del parts[i]   # Text has zero width
             else:



More information about the Pypy-commit mailing list