Exception from Jitters. They Stole Two Millions, ts2m

Hey. I'm getting the following on Python2.7, 32 bit, WindowsXP:
> python -O run_game.py
Traceback (most recent call last):
  File "run_game.py", line 39, in <module>
    run_optimized()
  File "run_game.py", line 36, in run_optimized
    main.main()
  File "F:\Documents and Settings\jhartley\Desktop\pyweek11\ts2m\gamelib\main.py", line 23, in main
    pyknic.Application(state.StartState(), '[0,100000000000)','data/custom.yaml').run()
  File "F:\Documents and Settings\jhartley\Desktop\pyweek11\ts2m\pyknic\__init__.py", line 514, in run
    self._cur_state.on_init(self)
  File "F:\Documents and Settings\jhartley\Desktop\pyweek11\ts2m\gamelib\state.py", line 33, in on_init
    self.draw_menu(0)
  File "F:\Documents and Settings\jhartley\Desktop\pyweek11\ts2m\gamelib\state.py", line 61, in draw_menu
    font = pygame.font.SysFont("Dejavu Sans", 18)
  File "F:\Python27\lib\site-packages\pygame\sysfont.py", line 577, in SysFont
    font = pygame.font.Font(fontname, size)
IOError: unable to read font filename


If I look in Control Panel, Fonts, I see I do have a font installed called "DejaVu Sans (TrueType)", which refers to file:
file:///F:/WINDOWS/Fonts/DejaVuSans.ttf

I tried changing state.py line 61, capitalising the 'V', and removing the space, but to no avail. Does anyone know what it should read?

(log in to comment)

Comments

I got it to work fine by reducing titlefont in size to 18, and just using that everywhere instead of font. Gotta love the robberies!