From 5230e79cb82ca673cfa63ded56a2628bcb0042cf Mon Sep 17 00:00:00 2001 From: SpitfireX Date: Sat, 8 Aug 2015 19:01:44 +0200 Subject: Font rendering now truly backwards compatible! turns out python needs much broader error handling than expected.... and I committed buggy code. --- test.py | 6 +++--- 1 file 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 -- cgit v1.2.3