[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] a question about Font



I use font " pygame.font.Font("font.ttf", 20) ",and I have copy the font.ttf file in the current folder, using py2exe to complie it, when making a console exe (console = ["gamemain.py"]), It work well, but when complied it to windows model(windows = ["gamemain.py"]), executing it will meet a error at line " pygame.font.Font("font.ttf", 20) ",the log message:

Traceback (most recent call last):
 File "gamemain.py", line 121, in ?
 File "gamemain.py", line 74, in main
IOError: unable to read font filename

what's wrong, I use Chinese vesion windows 2000