I was making a simple sliding puzzle game. For that I used some fonts that were not in my system. When I run the code in the interpreter it works just fine. I could see the fonts as they were supposed to be.
I created the font object using the following line of code:
font = pygame.font.Font("cooper-black.ttf", 32)
But after I built the python code to make a stand-alone executable, the program didn’t even run properly.
I built the executable file in the following manner:
pyinstaller --onefile --add-data=cooper-black.ttf:. --add-data=fragment-core.otf:. main.py
I tried Google, YouTube, and Stack Overflow, but could not solve the issue.
What should I do in this situation? Is there any other way of doing it?
supahaxxa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.