summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSpitfireX <timm.weber@me.com>2015-08-08 19:01:44 +0200
committerSpitfireX <timm.weber@me.com>2015-08-08 19:01:44 +0200
commit5230e79cb82ca673cfa63ded56a2628bcb0042cf (patch)
treeee6c39ad2384b3c6a38d23f020b62ddef092d7cb
parent38f0af91c52f22d26f862239974bcabc0e11f9ff (diff)
Font rendering now truly backwards compatible!
turns out python needs much broader error handling than expected.... and I committed buggy code.
-rw-r--r--test.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test.py b/test.py
index 12ed196..c93d72a 100644
--- a/test.py
+++ b/test.py
@@ -118,7 +118,7 @@ def generateVirus(spikes, spike_length, radius, global_coords):
def initializeFont():
try:
pygame.freetype.init()
- except ImportError:
+ except:
pygame.font.init()
def drawText(text, color, font_size):
@@ -127,8 +127,8 @@ def drawText(text, color, font_size):
font = pygame.freetype.SysFont(pygame.freetype.get_default_font(), font_size)
output = font.render(text, color)
return output[0]
- except ImportError:
- font = pyggame.font.SysFont(pygame.freetype.get_default_font(), font_size)
+ except:
+ font = pygame.font.SysFont(pygame.font.get_default_font(), font_size)
output = font.render(text, 1, color)
return output