Font module error when using pygame2exe

I used Pygame2exe from the Pygame website and got rid of the problem with .dlls, but there still remains an error that remains.
The only font I use is the standard pygame ( freesansbold.ttf) font , and I have included a copy of it in my games directory.
Also,
I am using a class Font, not a SysFonts class, which I thought would fix my problem.
Any thoughts?

C:\Python26\apple_orchard\dist\appleorchard.exe:27: RuntimeWarning: use font: MemoryLoadLibrary failed loading pygame\font.pyd
(ImportError: MemoryLoadLibrary failed loading pygame\font.pyd)
Traceback (most recent call last):
  File "appleorchard.py", line 165, in <module>
  File "appleorchard.py", line 27, in __init__
  File "pygame\__init__.pyo", line 70, in __getattr__
NotImplementedError: font module not available
(ImportError: MemoryLoadLibrary failed loading pygame\font.pyd)
+3
source share
2 answers

Your problem looks very similar to this: http://thadeusb.com/weblog/2009/4/15/pygame_font_and_py2exe

Try adding "sdl_ttf.dll"system DLLs to the list, for example:

origIsSystemDLL = py2exe.build_exe.isSystemDLL # save the orginal before we edit it
def isSystemDLL(pathname):
    # checks if the freetype and ogg dll files are being included
    if os.path.basename(pathname).lower() in ("libfreetype-6.dll", "libogg-0.dll", "sdl_ttf.dll"):
            return 0
    return origIsSystemDLL(pathname) # return the orginal function
py2exe.build_exe.isSystemDLL = isSystemDLL # override the default function with this one
+3

, pygame.font . ?

-1