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

Re: [pygame] Problems with py2exe and Pygame



On Dec 4, 2007 12:49 PM, hwg <hwg434@xxxxxxxxx> wrote:
> The default font ("freesansbold.ttf") does get copied over to the dist
> folder.  (I saw some posts about that problem)  But the error log when I try
> to run it says this:
>
> Traceback (most recent call last):
>   File "lunarlander.py", line 111, in <module>
>   File "lunarlander.py", line 49, in display_stats
> RuntimeError: default font not found
> I'm running python 2.5.1, Pygame 1.7.1 and a recent version of py2exe (I
> don't know how to find the version number, but the modified date on the
> build_exe.py file is October 3, 2007).
>
One way to avoid this problem is to use a font explictly, instead of
using the default. With the font in the dist directory it won't get
loaded as the default, but you ought to be able to load it by name.