diff options
author | SpitfireX <timm.weber@me.com> | 2015-08-08 19:01:44 +0200 |
---|---|---|
committer | SpitfireX <timm.weber@me.com> | 2015-08-08 19:01:44 +0200 |
commit | 5230e79cb82ca673cfa63ded56a2628bcb0042cf (patch) | |
tree | ee6c39ad2384b3c6a38d23f020b62ddef092d7cb /test.py | |
parent | 38f0af91c52f22d26f862239974bcabc0e11f9ff (diff) |
Font rendering now truly backwards compatible!
turns out python needs much broader error handling than expected.... and
I committed buggy code.
Diffstat (limited to 'test.py')
-rw-r--r-- | test.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |