Okay, here's my temporary fix:
1. Add a default font file in your game. My choice is the
'freesansbold.ttf' as this one does seem standard and is included in
Pygame (you'll find it in its source code, if nothing else, or
site-packages/pygame/freesansbold.ttf).
2. Add a few line before creating the font.
import sys
if getattr(sys, "frozen"): # FROZEN executable
font_family = "./freesansbold.ttf" # Hard-code a local path
else:
font_family = pygame.font.match_font(font_family)
self.font_object = pygame.font.Font(font_family, font_size)
So we give it the local filename if the executable is frozen. Copy the
freesansbold.ttf next to the final executable and try it. It should
work. Wrap the data file is you like to do so, it all should work.
This is, however, a temporary fix, it would be great to have
pkg_resources working, but one step at a time.
Cheers,
Vincent